错误:Error: Chunk.entry was removed. Use hasRuntime()

webpack 1.x升级过程中的踩坑总结大全

 

卸载npm uninstall extract-text-webpack-plugin --save-dev

重新下载 npm install [email protected]^2.0.0-beta.4

错误:Error: Breaking change: extract now only takes a single argument.

webpack 1.x升级过程中的踩坑总结大全

 

原因是webpack2对loader的配置做了一些调整,修改 ExtractTextPlugin配置即可:

{
 test: /\.less$/,
 use: ExtractTextPlugin.extract({
  fallback: 'style-loader',
  use: ['css-loader', 'less-loader']
 })
},

 

相关文章:

  • 2021-11-11
  • 2022-12-23
  • 2021-05-04
  • 2021-12-26
  • 2021-06-30
  • 2022-01-27
  • 2022-12-23
  • 2021-08-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2021-10-10
相关资源
相似解决方案