fix(Chip): fix stylus SyntaxError "Unknown word - padding"#81
Open
RayJune wants to merge 1 commit intoecomfe:masterfrom
Open
fix(Chip): fix stylus SyntaxError "Unknown word - padding"#81RayJune wants to merge 1 commit intoecomfe:masterfrom
RayJune wants to merge 1 commit intoecomfe:masterfrom
Conversation
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.
san-devtool 在使用 san-mui 的 Chip 组件时,会因为 "padding" 这行代码产生 SyntaxError 的报错信息(构建工具版本 Webpack@4.43.0, stylus-loader@3.0.2 , css-loader@3.5.3, san-mui@1.1.5)。报错信息如下:
ERROR in ./node_modules/san-mui/lib/Chip/Chip.styl (./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src!./node_modules/stylus-loader!./node_modules/san-mui/lib/Chip/Chip.styl)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
SyntaxError
(41:3) Unknown word
39 | padding: 0 12px;
40 | padding
> 41 | cursor: default;
结合代码上下文,删除掉第 40 行的 padding 即解决了这个问题。