Node.js/webpack:修订间差异
来自康健生活
| 第626行: | 第626行: | ||
*: 原因是在 babel-loader 组件中使用了 <code>useBuiltIns: 'usage'</code>,解决办法非常简单,就是在 <code>module.rules.exclude</code> 中将 css、scss 等不想被遍历的文件或文件夹排除过滤掉,由于新版 webpack 的 exclude 规则不再支持 string、array,以至于一个小时后才找到问题所在,新版使用正则进行过滤 <code>exclude: /((sc|sa|le|c)ss\/.*)|(node_modules\/.*)/</code> | *: 原因是在 babel-loader 组件中使用了 <code>useBuiltIns: 'usage'</code>,解决办法非常简单,就是在 <code>module.rules.exclude</code> 中将 css、scss 等不想被遍历的文件或文件夹排除过滤掉,由于新版 webpack 的 exclude 规则不再支持 string、array,以至于一个小时后才找到问题所在,新版使用正则进行过滤 <code>exclude: /((sc|sa|le|c)ss\/.*)|(node_modules\/.*)/</code> | ||
* Uncaught ReferenceError: _dll_commoncss is not defined | * Uncaught ReferenceError: _dll_commoncss is not defined | ||
* css 类名中符合 BEM 规则的标签被删除 | * 热启动时 css 类名中符合 BEM 规则的标签被删除 | ||
* 热启动时报错 external "public_style_library":1 Uncaught ReferenceError: public_style_library is not defined | * 热启动时报错 external "public_style_library":1 Uncaught ReferenceError: public_style_library is not defined | ||