Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Sass legacy API deprecation warning starting in 6.24.0 #2671

Open
3 tasks done
tedw opened this issue Jan 14, 2025 · 1 comment
Open
3 tasks done

[bug] Sass legacy API deprecation warning starting in 6.24.0 #2671

tedw opened this issue Jan 14, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@tedw
Copy link

tedw commented Jan 14, 2025

Agreement

Describe the issue

After upgrading to Bud 6.24.0 I started seeing this deprecation warning:

Module Warning (from ../node_modules/sass-loader/dist/cjs.js):
Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/legacy-js-api

Everything still works and I can silence the warning using the following config, but would be great if we could fix this for everyone.

export default async (bud) => {
  // Use the build.before action to ensure Sass is available
  // https://discourse.roots.io/t/bud-6-3-0-and-sass/23570/3
  bud.hooks.action('build.before', async (bud) => {
    // Set custom Sass options
    bud.build.items.sass.setOptions({
      sassOptions: {
        // Silience legacy API warning
        // https://sass-lang.com/documentation/breaking-changes/legacy-js-api/
        silenceDeprecations: ['legacy-js-api']
      },
      sourceMap: true,
    });
  });
  
  // Rest of config
  
};

Expected Behavior

No Sass deprecation warnings

Actual Behavior

I get the Sass legacy JS API warning

Steps To Reproduce

  1. Upgrade to Bud 6.24.0
  2. Run yarn start

version

6.24.0

Logs

No response

Configuration

No response

Relevant .budfiles

No response

@tedw tedw added the bug Something isn't working label Jan 14, 2025
@tedw tedw changed the title [bug] Sass deprecation warning starting in 6.24.0 [bug] Sass legacy API deprecation warning starting in 6.24.0 Jan 14, 2025
@daverobertson
Copy link

Thank you for sharing this workaround for bud.config!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants