今天捣鼓webpack4踩到一个弥天大坑:使用html-webpack-plugin打包html的时候一直报 compilation.mainTemplate.applyPluginsWaterfall is not a function ,百度了半天没结果,谷歌一下终于在github上找到了解决方案:https://github.com/jantimon/html-webpack-plugin/issues/841

解决:先安装yarn,然后在项目跟目录下运行:

yarn add webpack-contrib/html-webpack-plugin -D

简单来说就是使用webpack官方维护的html-webpack-plugin来代替第三方的。

 

相关文章:

  • 2021-12-06
  • 2021-05-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2021-08-23
猜你喜欢
  • 2021-07-28
  • 2021-08-08
  • 2022-01-15
  • 2022-02-21
  • 2021-10-04
  • 2022-12-23
  • 2021-07-10
相关资源
相似解决方案