Skip to content

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

@tedw

Description

@tedw

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions