添加html模板后打包報(bào)錯(cuò)
主要報(bào)錯(cuò)是這個(gè):
ERROR in Path must be a string. Received undefined。代碼如下:
。
有遇到過(guò)嗎?我的package.json如下:
{ ??"name":?"webpack4config", ??"version":?"1.0.0", ??"description":?"", ??"main":?"index.js", ??"scripts":?{ ????"test":?"echo?\"Error:?no?test?specified\"?&&?exit?1", ????"webpack":?"webpack?--config?webpack.config.js?--progress?--display-modules?--colors?--display-reason" ??}, ??"keywords":?[], ??"author":?"", ??"license":?"ISC", ??"devDependencies":?{ ????"webpack":?"^4.17.1", ????"webpack-cli":?"^3.1.0", ????"webpack-html-plugin":?"^0.1.1" ??}
2018-08-24
不好意思,搞錯(cuò)了,html包名稱安裝錯(cuò)了。是“html-webpack-plugin”而不是“webpack-html-plugin”。安裝對(duì)了就沒(méi)有問(wèn)題了