Skip to content

Instantly share code, notes, and snippets.

@amowu
Forked from paularmstrong/webpack.config.js
Created May 13, 2017 15:41
Show Gist options
  • Save amowu/f55ade4eae3fc1263692b63ad795ca2f to your computer and use it in GitHub Desktop.
Save amowu/f55ade4eae3fc1263692b63ad795ca2f to your computer and use it in GitHub Desktop.
const plugins = [
// extract vendor and webpack's module manifest
new webpack.optimize.CommonsChunkPlugin({
names: [ 'vendor', 'manifest' ],
minChunks: Infinity
}),
// extract common modules from all the chunks (requires no 'name' property)
new webpack.optimize.CommonsChunkPlugin({
async: true,
children: true,
minChunks: 4
})
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment