index.html 用模板写法 说申明的 HtmlWebpackPlugin 找到不到
const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { entry: { main:'./src/script/main.js', a:'./src/script/a.js' }, output: { path:path.join(__dirname,'./dist'), filename: 'js/[name].js' }, plugins: [ new HtmlWebpackPlugin({ filename: 'index.html', template:'index.html', inject:"head", title:"webpack is good", data:"1" }) ], }