admin管理员组

文章数量:1333167

It seems that the Bootstrap team has switched from "Node.js" to "Dart Sass" for its compilation. But I get a lot of deprecation warnings using Dart Sass.

When compiling the Bootstrap (.scss) source files using from Dart Sass there are many deprecation warnings (import, color,...).

How do I fix this without changing the source files? The --quiet-deps flag also does not silence the warnings (there is a specific one for @import warnings: --silence-deprecation=import) like color, etc...

It seems that the Bootstrap team has switched from "Node.js" to "Dart Sass" for its compilation. But I get a lot of deprecation warnings using Dart Sass.

When compiling the Bootstrap (.scss) source files using from Dart Sass there are many deprecation warnings (import, color,...).

How do I fix this without changing the source files? The --quiet-deps flag also does not silence the warnings (there is a specific one for @import warnings: --silence-deprecation=import) like color, etc...

Share Improve this question asked Nov 20, 2024 at 15:34 JohanVCJohanVC 411 silver badge2 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The warning id now included into the message:

Deprecation Warning [color-functions]: green() is deprecated. Suggestion:

so just add every warning as additional command parameter ( --silence-deprecation=color-functions ). this works well

For bootstrap customization those specific should be used:

sass --source-map --silence-deprecation=color-functions --silence-deprecation=import --silence-deprecation=global-builtin --silence-deprecation=mixed-decls src/customBootstrap.scss wwwroot/css/customBootstrap.css

here Bootstrap.scss was imported in the customBootstrap.scss using @import

P.S. sass-dart team wrote that --quiet-deps should not work by design if there are no sass "importers" involved. Just adding --load-path is not enough. As I understand this means that you should switch from compiling scss from command prompt to compiling scss by call sasspile API function from sass package e.g. in gulp task.

本文标签: Compiling Bootstrap v533 with Dart Sass results in deprecation warningsStack Overflow