最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin0浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论