See the following issues: https://github.com/webpack-contrib/sass-loader/issues/954 and https://github.com/sass/sass/issues/3065.

The quietDeps option isn't exposed yet to the Node.js API.

In the meantime you can downgrade to sass 1.32 without too many changes.

EDIT: It's now available in sass 1.35.1.

Answer from tcit on Stack Overflow
🌐
Makandra
makandracards.com › makandra › 518124-sass-get-rid-deprecation-warnings-dependencies
Sass: How to get rid of deprecation warnings in dependencies - makandra dev
silenceDeprecations: Allows to set a list of deprecation types Show archive.org snapshot you want to silence for your own code · Below there are a few examples for different build tools how to set the Sass options.
🌐
GitHub
github.com › webpack-contrib › sass-loader › issues › 954
How to set `quietDeps` option for dart-sass · Issue #954 · ...
April 23, 2021 - const sassLoader = { loader: 'sass-loader', options: { sassOptions: { quietDeps: true, }, }, };
Published   May 24, 2021
Author   gcangussu
Top answer
1 of 6
35

To hide the warnings, update your vite.config.js like this:

export default defineConfig({
  css: {
    preprocessorOptions: {
      scss: {
        quietDeps: true
      }
    }
  }
})

UPDATE: a critical requirement is that you have your paths relative to node_modules or another folder that SCSS is considering to hold external modules. These folders can be listed in loadPaths scss option (node_modules is included by default, at least when SCSS is run from Vite). And not relative to current file!

E.g. this path works - all warnings are excluded:

@forward 'spinkit/scss/spinners/7-three-bounce.scss';

This path doesn't work - all warnings are shown:

@forward '../../node_modules/spinkit/scss/spinners/7-three-bounce.scss';

This requirement can be understood by reading SCSS quietDeps option description.

2 of 6
22

A fresh solution for those who are looking for a way to fix the warning in Vite:

Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

The quietDeps: true rule mentioned above does not work for this warning.

The most preferable way is to make Vite to use modern API for SASS:

    vite: {
        css: {
            preprocessorOptions: {
                scss: {
                    api: 'modern-compiler', // or 'modern'
                },
            },
        },
    },

Vite docs: css.preprocessorOptions

But if you want to just silence deprecation warnings, use silenceDeprecations option:

    vite: {
        css: {
            preprocessorOptions: {
                scss: {
                    silenceDeprecations: ['legacy-js-api'],
                },
            },
        },
    },

SASS docs for silenceDeprecations SASS Deprecations list

Both solutions work on Vite 5.4.6, and Sass 1.79.1

🌐
Sass
sass-lang.com › documentation › js-api › interfaces › deprecations
Sass: Deprecations | JS API
Any of these IDs or the deprecation objects they point to can be passed to fatalDeprecations, futureDeprecations, or silenceDeprecations.
🌐
Sass
sass-lang.com › documentation › breaking-changes › mixed-decls
Sass: Breaking Change: Mixed Declarations
If you know that one particular deprecation isn’t a problem for you, you can silence warnings for that specific deprecation using the --silence-deprecation flag on the command line, or the silenceDeprecations option in the JavaScript API.
Find elsewhere
🌐
Rsbuild
rsbuild.rs › plugins › list › plugin-sass
Sass plugin - Rsbuild
Sass uses warning logs to highlight ... to these warnings. If you do not want to see them, you can ignore the warnings by using the silenceDeprecations option in Sass....
🌐
webpack
webpack.js.org › loaders › sass-loader
sass-loader | webpack
Loads a Sass/SCSS file and compiles it to CSS. ... To enable CSS processing in your project, you need to install style-loader and css-loader via npm i style-loader css-loader.
🌐
Sass
sass-lang.com › documentation › breaking-changes › import
Sass: Breaking Change: @import and global built-in functions
Note: While the deprecations for ... deprecation warnings and global built-in deprecation warnings, you’ll need to pass both import and global-builtin to --silence-deprecation/silenceDeprecations....
🌐
Reddit
reddit.com › r/angular › updated to angular 19 and now getting bombarded with sass warnings
r/angular on Reddit: Updated to Angular 19 and now getting bombarded with Sass warnings
October 26, 2025 -

Hi

I just updated a medium-large sized project to Angular 19 and now I'm getting flooded with sass warnings

Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

There were a few other warnings like map-merge, percentage

I managed to update those with the sass migrate tool sass-migrator module --migrate-deps

but I haven’t migrated the import warnings yet. I’m not really a CSS/Sass person, so I’m not sure where to even start. These were some files that I rarely touched and I can't just replace the imports with use for the existing scss files.

Anyone who had to face the same situation?

What steps did you take? Did you ignore the warnings or took time to fix it.

🌐
Sass
sass-lang.com › documentation › breaking-changes › legacy-js-api
Sass: Breaking Change: Legacy JS API
While the legacy JS API was marked ... to migrate to the modern API but want to silence the warnings for now, you can pass legacy-js-api in the silenceDeprecations option:...
🌐
CoreUI
coreui.io › blog › angular-19-sass-deprecation-warnings
Dealing with Sass Deprecation Warnings in Angular 19 · CoreUI
December 6, 2024 - fatalDeprecations: This option identifies Sass features already deprecated and will cause the build to fail. silenceDeprecations: This option suppresses deprecation warnings for specific versions.
🌐
Sass
sass-lang.com › documentation › js-api › interfaces › options
Sass: Options | JS API
Options that can be passed to compile, compileAsync, compileString, or compileStringAsync · This lets the TypeScript checker verify that asynchronous Importers, FileImporters, and CustomFunctions aren't passed to compile or compileString
🌐
GitHub
github.com › sass › node-sass › issues › 2334
Disable "DEPRECATION WARNING"s · Issue #2334 · sass/node-sass
April 16, 2018 - We're using gulp-sass package that is only a wrapper for node-sass. We encounter lots of deprecation warnings like: DEPRECATION WARNING: Passing a string to call() is deprecated and will be illegal in Sass 4.0. Use call(get-function("var...
Author   janrembold
🌐
Reddit
reddit.com › r/sveltejs › has anyone been able to fix or silence the recent sass js api legacy warnings?
r/sveltejs on Reddit: Has anyone been able to fix or silence the recent SASS JS API legacy warnings?
September 25, 2024 -

I'm using SvelteKit with sveltePreprocess and getting a million warnings:

Deprecation [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

No matter what I put in Svelte config or Vite config, I am not able to get SvelteKit to use modern-compiler or STFU about the warnings. Nothing presented here helps.

Has anyone had some success with this?

🌐
GitHub
github.com › sass › dart-sass › issues › 2280
trying ignore `mixed-decls` warning but still got these warning in Vite(`5.3.1`). · Issue #2280 · sass/dart-sass
July 14, 2024 - // vite.config.js css: { preprocessorOptions: { scss: { silenceDeprecations: ["mixed-decls"], }, }, },
Author   daiwanxing