Member-only story
How to disable the Angular v19’s sass compiler deprecation warnings
Angular v19
If you’re updating one of these Angular apps to the release candidate of Angular v19 with the following command
you may encounter a ton of deprecation warnings from the Sass compiler when serving or building your Angular app.
The compiler output might look something like this
[WARNING] Deprecation [plugin angular-sass]
[...]_variables.scss:79:29:
LN │ $dark-color: darken($color, 10%) !default;
╵ ^
darken() is deprecated. Suggestions:
color.scale($color, $lightness: -17.0568561873%)
color.adjust($color, $lightness: -10%)
More info: https://sass-lang.com/d/color-functions
The plugin "angular-sass" was triggered by this import
So far, numerous Angular apps I’ve tested have shown these warnings
Sass Compiler Update in Angular v19
After some research, I found that the issue is due to the Angular Sass compiler dependency being updated from version “1.77.6” to “1.80.6”.
Through some investigation and a helpful tip from ma man Matthieu Riegler, I learned that Angular v19 release candidate already ships an option in the Sass (pre-)compiler settings configuration to address this exact…