entry
entry: {main:{// 入口import: ['./src/app.js','./src/app2.js'],// 公共依赖,单独打包出来dependOn: 'lodash',filename: "channel1/[name].js"},main2:{import: './src/app3.js',dependOn: 'lodash',filename: "channel2/[name].js"},lodash:{import: 'lodash',filename: "common/[name].js"}},
plugi
plugins: [new HtmlWebpackPlugin({title: "多页面应用01",template: "./index.html",// script标签引入的位置inject: 'body', // head,body// 输出文件名filename: "channel1/index.html",// 引入哪个入口,该实例载入哪些chunkschunks: ['main','lodash'],publicPath:'http://www.b.com'}),new HtmlWebpackPlugin({title: "多页面应用02",template: "./index2.html",inject: 'body',filename: "channel2/index2.html",chunks: ['main2','lodash'],publicPath:'http://www.a.com'}),],
