webpack/examples/explicit-vendor-chunk/webpack.config.js

21 lines
386 B
JavaScript
Raw Normal View History

2015-04-28 22:58:01 +08:00
var path = require("path");
var CommonsChunkPlugin = require("../../lib/optimize/CommonsChunkPlugin");
module.exports = {
entry: {
2015-04-30 02:34:04 +08:00
vendor: ["./vendor"],
2015-04-28 22:58:01 +08:00
pageA: "./pageA",
pageB: "./pageB",
pageC: "./pageC"
},
output: {
path: path.join(__dirname, "js"),
filename: "[name].js"
},
plugins: [
new CommonsChunkPlugin({
name: "vendor",
minChunks: Infinity
})
]
2015-04-30 02:34:04 +08:00
};