Node.js/webpack:修订间差异
来自康健生活
| 第627行: | 第627行: | ||
* Uncaught ReferenceError: _dll_commoncss is not defined | * Uncaught ReferenceError: _dll_commoncss is not defined | ||
* 热启动时 css 类名中符合 BEM 规则的标签被删除 | * 热启动时 css 类名中符合 BEM 规则的标签被删除 | ||
*: | *: 原因是 sass-loader 组件的选项 <code>options.sassOptions.outputStyle:'compressed'</code> 开启了压缩,破坏了文档结构,关闭压缩即可,这个问题我排查了8个小时。 | ||
* 热启动时报错 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 | ||
*: public_style_library 引起的错误的连锁反应,AddAssetHtmlPlugin 组件插入 html 文档的顺序在 HtmlWebpackPlugin 引入组件之前,导致 js 加载顺序出现错误 | *: public_style_library 引起的错误的连锁反应,AddAssetHtmlPlugin 组件插入 html 文档的顺序在 HtmlWebpackPlugin 引入组件之前,导致 js 加载顺序出现错误 | ||