html-webpack-plugin自动生成html页面运行报错如下:
解决方案:
由于我在webpack.config.js
中导入html-webpack-plugin
这个模块,然后在plugins
属性身上创建一个html-webpack-plugin
的实例;但是本地没有安装这个插件。
安装html-webpack-plugin
插件:npm i html-webpack-plugin -D
webpack.config.js配置如下:
html-webpack-plugin自动生成html页面运行报错如下:
解决方案:
由于我在webpack.config.js
中导入html-webpack-plugin
这个模块,然后在plugins
属性身上创建一个html-webpack-plugin
的实例;但是本地没有安装这个插件。
安装html-webpack-plugin
插件:npm i html-webpack-plugin -D
webpack.config.js配置如下: