const config = {entry:{index:path.join(srcPath,'index.js'),other:path.join(srcPath,'other.js')},plugins:[new HtmlWebpackPlugin({template:path.join(srcPath,'index.html'),filename:'index.html',// chunks 表示该页面要引用哪些chunk 即上面的 index 和 otherchunks:['index']}),new HtmlWebpackPlugin({template:path.join(srcPath,'other.html'),filename:'other.html',chunks:['other']})]}
entry:配置入口文件
plugins:[ new HtmlWebpackPlugin()] 生成html文件,去指定入口配置的文件
