简体   繁体   English

Ember js 2,在我的app.scss生产中使用scss @import不会删除最终CSS中的注释

[英]Ember js 2, Using scss @import in my app.scss production doesn’t remove comments in final css

In my app.scss file I'm using 在我使用的app.scss文件中

@import "./node_modules/bootstrap/scss/bootstrap";

because I'm using (and sometimes changing) some Bootstrap variable into my app.scss. 因为我在我的app.scss中使用(有时会更改)一些Bootstrap变量。

I found that with ember build -prod it doesn't remove comments from within Bootstrap imports in my final app.css. 我发现使用ember build -prod并不会从我最终的app.css中的Bootstrap导入中删除注释。

So in my production css I have this: 所以在我的生产CSS中,我有这个:

/*!
 * Bootstrap v4.0.0-beta (https://getbootstrap.com)
 * Copyright 2011-2017 The Bootstrap Authors
 * Copyright 2011-2017 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */address,dl,ol,p,ul{margin-bottom:1rem}body,caption{text-align:left}........

Why? 为什么?

How can I remove those superfluous comments? 如何删除那些多余的评论?

/*! is a "special" comment due to the ! 是由于引起的“特殊”评论! character at the end which will not be stripped from the build. 最后的字符,不会从构建中删除。 It usually contains mandatory license information, which means that it would actually be illegal to strip it if you use any Bootstrap assets. 它通常包含强制性许可证信息,这意味着如果您使用任何Bootstrap资产,则将其剥离实际上是非法的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM