Closed
Description
Webpack 2 documentation on this topic has not been written as of this writing, but it hasn't changed from Webpack 1 to much.
var webpack = require("webpack");
module.exports = {
entry: {
app: "./app.js",
vendor: ["jquery", "underscore", ...],
},
output: {
filename: "bundle.js"
},
plugins: [
new webpack.optimize.CommonsChunkPlugin(/* chunkName= */"vendor", /* filename= */"vendor.bundle.js")
]
}
Source: https://webpack.github.io/docs/code-splitting.html#split-app-and-vendor-code
Metadata
Metadata
Assignees
Labels
No labels