Compiling Bootstrap v5.3.3 with Dart Sass results in deprecation warnings - Stack Overflow

It seems that the Bootstrap team has switched from "Node.js" to "Dart Sass" for its

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742348527a4427038.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信