const HtmlWebpackPlugin = require("html-webpack-plugin")
//插件
plugins: [
//添加版权
new webpack.BannerPlugin("@最终版权归尚振华所有"),
new HtmlWebpackPlugin({
template: "index.html"
})
]
这样dist文件夹里就有index.html文件了