【发布时间】:2017-01-03 22:40:09
【问题描述】:
这是我的代码:
@for $i from 1 through 3 {
.myclass-#{$i} {
/* ... */
}
}
我正在使用webpack,但出现此错误:
ERROR in ./~/css-loader!./~/sass-loader!./~/postcss-loader?pack=cleaner!./path/style.scss
/path/to/my/file/style.scss:649:22: Unknown word
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser
@for $i from 1 through 3 {
.myclass-#{$i} {
^
有办法解决吗?
我使用这个配置:
{
test: /\.scss$/,
loaders: ["style", "css", "sass", "postcss?pack=cleaner"]
},
谢谢
【问题讨论】: