- 今天第一次用webpack创建类似脚手架的东西
- 网上说打包完成之后的bundle.js 报404 也有可能是在你的模版文件中
new HtmlWebpackPlugin({
title: "HELLO", // 网站 title
template: srcRoot + "/modules/datascreen/index.html", // 也就是这个文件中
})
你在dist目录中打包出一个index.html 中自动会引入bundle.js,所以在模版文件中是不用引入的