vue中执行npm run build报错解决方法?
遇到了执行npm run build 后报错:
[build:js ] Module not found: Error: Can't resolve 'scss-loader' in 'D:\works\works\H5-IM\im-h5\src\pages'
|
在webpack.config.js里面加:
test: /\.vue$/,
loader: 'vue-loader',
options: {
autoprefixer: false,
loaders: {
scss: 'vue-style-loader!css-loader!sass-loader',
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax',
},
OK,解决啦!收藏一波