const HtmlWebpackPlugin = require('html-webpack-plugin')plugins: [new HtmlWebpackPlugin({template: "./src/html/index.html",filename: "./html/webJHtml.html" // 名字前加文件夹名字会自动打包到指定的文件夹里, 如果没有文件夹会自动生成文件夹})],
1️⃣ html-webpack-plugin
npm i --save-dev html-webpack-plugin@4
1. webpack4 要安装4版本的 html-webpack-plugin2. webpack5 要安装5版本的 html-webpack-plugin
2️⃣ 配置插件的输出结果
2️⃣ html 模板
2️⃣ 生成的 html 文件

