为了账号安全,请及时绑定邮箱和手机立即绑定

dvajs 配置sass报错 ????

dvajs 配置sass报错 ????

森林海 2018-08-14 07:39:23
在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
查看完整描述

1 回答

?
阿晨1998

TA贡献2037条经验 获得超6个赞

webpackConfig.module.loaders.push => webpackConfig.module.rules.push


查看完整回答
反对 回复 2018-08-23
  • 1 回答
  • 0 关注
  • 1021 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信