在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
我改了配置不报错 但是引用sass文件还是说没有配置报错
可以直接在roadhogrc 里面进行布尔值的配置