webpack/examples/multiple-entry-points/webpack.config.js

19 lines
385 B
JavaScript
Raw Normal View History

2013-11-20 01:09:26 +08:00
var path = require("path");
var CommonsChunkPlugin = require("../../lib/optimize/CommonsChunkPlugin");
2013-11-20 01:09:26 +08:00
module.exports = {
entry: {
pageA: "./pageA",
pageB: "./pageB"
},
output: {
path: path.join(__dirname, "js"),
filename: "[name].bundle.js",
2013-12-03 18:19:30 +08:00
chunkFilename: "[id].chunk.js"
},
plugins: [
2016-02-04 19:50:24 +08:00
new CommonsChunkPlugin({
filename: "commons.js",
name: "commons"
})
]
2013-11-20 01:09:26 +08:00
}