webpack4 使用 html-webpack-plugin插件报错:compilation.mainTemplate.applyPluginsWaterfall is not a function
前端 /
2018-02-26 /
阅读: 58
webpack升级到了4.0版本了,但是在使用html-webpack-plugin插件时,报错,提示:
/xxx/node_modules/html-webpack-plugin/lib/compiler.js:81 var outputName = compilation.mainTemplate.applyPluginsWaterfall('asset-path', outputOptions.filename, { ^ TypeError: compilation.mainTemplate.applyPluginsWaterfall is not a function
解决方法:
npm install webpack-contrib/html-webpack-plugin -D