webpack.config.js:
webpackConfig.module.loaders.push({
test: /\.scss$/,
loaders: [
'style',
'css?sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass'
]
});
..这个insert code 怎么回事,死活弄不好格式
之后index.js 引入sass, 给组件加上className,就是找不到风格,
npm run build,查看index.css 大小跟没导入sass之前一模一样
请跟进这个 issue,https://github.com/sorrycc/roadhog/issues/273
webpackConfig.module.loaders.push({
test: /.scss$/,
loader: _extractTextWebpackPlugin.extract('style', 'css!postcss!sass')
})
if (env == "development") {
webpackConfig.plugins.push(new _extractTextWebpackPlugin('[name].css'));
}
目前解决方案,等作者加 sass:true 吧
你这个配置好了嘛 我现在sass配置不行@sorrycc
Most helpful comment
webpackConfig.module.loaders.push({
test: /.scss$/,
loader: _extractTextWebpackPlugin.extract('style', 'css!postcss!sass')
})
if (env == "development") {
webpackConfig.plugins.push(new _extractTextWebpackPlugin('[name].css'));
}
目前解决方案,等作者加 sass:true 吧