在dvajs里面配置sass报错webpackConfig.module.loaders.push({
test: /\.module\.sass$/,
loader: path.join(path.dirname(require.resolve('extract-text-webpack-plugin')), 'loader.js') + '?{"remove":true}!css?sourceMap&modules&localIdentName=[local]___[hash:base64:5]&-autoprefixer!' + 'postcss-loader!'+ 'sass-loader?sourceMap'});
webpackConfig.module.loaders.forEach(function(loader, index) { if (typeof loader.test === 'function' && loader.test.toString().indexOf('\\.sass$') > -1) {
loader.include = /node_modules/;
loader.test = /\.sass$/;
} if (loader.test.toString() === '/\\.module\\.sass$/') {
loader.exclude = /node_modules/;
loader.test = /\.sass$/;
}
})报错信息是: webpackConfig.module.loaders.push({ ^TypeError: Cannot read property 'push' of undefined
添加回答
举报
0/150
提交
取消