码迷,mamicode.com
首页 > 移动开发 > 详细

webpack4: compilation.mainTemplate.applyPluginsWaterfall is not a function 解决方法

时间:2018-02-26 21:48:21      阅读:2814      评论:0      收藏:0      [点我收藏+]

标签:main   func   .com   https   git   water   安装   就是   维护   

今天捣鼓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来代替第三方的。

 

webpack4: compilation.mainTemplate.applyPluginsWaterfall is not a function 解决方法

标签:main   func   .com   https   git   water   安装   就是   维护   

原文地址:https://www.cnblogs.com/axel10/p/8475911.html

(0)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!