在使用webpack的时候使用html-webpack-plugin出现的问题
1.报错:
TypeError: The 'compilation' argument must be an instance of Compilation
是因为html-webpack-plugin的版本太高
2.报错:
TypeError: Cannot read property 'tapAsync' of undefined
是因为我不光在全局安装了webpack和webpack-cli还在项目内部安装了这些,虽然调整了全局的设置,但是项目内部并没有改变,调整项目内部版本号就能解决这个问题
ps:使用的版本号:
"html-webpack-plugin": "^3.2.0",
"webpack": "^4.46.0"
"webpack-cli": "^3.3.12"

浙公网安备 33010602011771号