ERROR in ./src/components/layer/layer.js
Module not found: Error: Can't resolve 'scss-loader' in 'G:\webpackDemo'
但是我明明已经安装好了,
{
test:/\.scss$/,
loader:'style-loader!css-loader!scss-loader'
}
代码就是这么写的,less都编译通过了
module:{ rules:[ { test:/\.css$/, use:[ 'style-loader', 'css-loader' ] }, { test:/\.scss$/, use:['style-loader','css-loader','sass-loader'] } ] }
首先安装sass-loader,scss-loader,node-sass 这三个loader。然后按照上面的配置就可以了
要装node-sass
请问你这个这问题解决了吗?
应该这样子使用:loader:'style-loader!css-loader!sass-loader'
原因见:http://stackoverflow.com/questions/33310216/scss-loader-with-webpack