Skip to content

Commit

Permalink
Silence dart-sass recent deprecations
Browse files Browse the repository at this point in the history
dart-sass is currently adding several deprecation warnings starting
in order to prepare their 2.0 version.

Those are displayed by webpack-dev-server in overlay at page load.

Disable all the recent ones (v1.77+), and enable quietDeps to avoid
warnings from dependencies.

Unfortunately, there is no way to disable them all without listing
them, so it might be necessary to add the upcoming ones if any.

See:
- https://sass-lang.com/documentation/js-api/interfaces/deprecations/
- sass/dart-sass#2352
- twbs/bootstrap#40962
- https://www.reddit.com/r/bootstrap/comments/1e6i6qg/how_you_guys_are_dealing_with_sass_deprecation/
  • Loading branch information
glepretre committed Jan 17, 2025
1 parent 847c393 commit b36e71e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions config.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,18 @@ function setupRules(
options: {
sassOptions: {
includePaths: [dirs.src, dirs.styles, dirs.modules],
/* Disable dart-sass 1.77+ deprecation warnings */
quietDeps: true,
silenceDeprecations: [
'color-4-api',
'color-functions',
'css-function-mixin',
'feature-exists',
'global-builtin',
'import',
'legacy-js-api',
'mixed-decls',
],
},
},
},
Expand All @@ -119,6 +131,18 @@ function setupRules(
options: {
sassOptions: {
includePaths: [dirs.src, dirs.styles, dirs.modules],
/* Disable dart-sass 1.77+ deprecation warnings */
quietDeps: true,
silenceDeprecations: [
'color-4-api',
'color-functions',
'css-function-mixin',
'feature-exists',
'global-builtin',
'import',
'legacy-js-api',
'mixed-decls',
],
},
},
},
Expand Down

0 comments on commit b36e71e

Please sign in to comment.