Skip to content

Instantly share code, notes, and snippets.

@codematix
Created September 17, 2015 17:49
Show Gist options
  • Save codematix/be2559c8e28b873071f6 to your computer and use it in GitHub Desktop.
Save codematix/be2559c8e28b873071f6 to your computer and use it in GitHub Desktop.
Two Explicit Vendor Chunks
var path = require("path");
var CommonsChunkPlugin = require("../../lib/optimize/CommonsChunkPlugin");
module.exports = {
entry: {
vendor1: ["./vendor1"],
vendor2: ["./vendor2"],
pageA: "./pageA",
pageB: "./pageB",
pageC: "./pageC"
},
output: {
path: path.join(__dirname, "js"),
filename: "[name].js"
},
plugins: [
new CommonsChunkPlugin({
names: ["vendor2", "vendor1"],
minChunks: Infinity
})
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment