- 命令行执行
npm install html-webpack-plugin --save-dev
成功出现下面信息:
html-webpack-plugin@3.2.0
added 58 packages from 73 contributors and audited 79 packages in 7.566s
found 0 vulnerabilities
此外,查看webpack.json文件,文件出现此插件的信息:
{
"name": "webpack_demo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"webpack": "webpack --mode development --mode production --config webpack.config.js --progress --colors --display-module --display-reason"
},
"author": "",
"license": "ISC",
"devDependencies": {
"html-webpack-plugin": "^3.2.0"
}
继续,
2.修改配置文