Support /*!no*/ comments syntax to fix issues #2#9
Open
leiming wants to merge 2 commits intosongsiqi:masterfrom
Open
Support /*!no*/ comments syntax to fix issues #2#9leiming wants to merge 2 commits intosongsiqi:masterfrom
/*!no*/ comments syntax to fix issues #2#9leiming wants to merge 2 commits intosongsiqi:masterfrom
Conversation
Author
|
可以试试把px更换为PX,我在react 项目中使用了该方式是没有问题的,希望对你有所帮助 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
提供
/*!no*/的注释语法,用于支持less-loader。请容我解释一下为何在
px2rem内部兼容,而不是去修复 webpack 或者 less-loader:/*!(据我所知,也是唯一的办法):!符号在 webpack 的 loader 语法上是模块关键字:px2rem?keepComment=!no(必然报错)必须通过
!兼容 Less.js 的 source-map ,而在 webpack loader 体系不能传递!,这就陷入一个死循环。我承认这个 PR 不是最优雅的做法,但在不修改 YUI Compress 标准,又不变化 Webpack 1.x 体系的前提下,在内部支持可能是代价最小却能解决实际问题的做法。
@songsiqi @Jinjiang 怎么看 ^_^?