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

17 lines
384 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",
chunkFilename: "[id].chunk.js",
namedChunkFilename: "[name].chunk.js"
},
plugins: [
new CommonsChunkPlugin("commons")
]
2013-11-20 01:09:26 +08:00
}