Skip to content

Instantly share code, notes, and snippets.

@marekpiechut
Created October 31, 2017 10:32
Show Gist options
  • Save marekpiechut/cd80dd84217d86f4eb9a86e0488fe667 to your computer and use it in GitHub Desktop.
Save marekpiechut/cd80dd84217d86f4eb9a86e0488fe667 to your computer and use it in GitHub Desktop.
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module) {
// this assumes your vendor imports exist in the node_modules directory
// and will move all modules from there to separate bundle
return module.context && module.context.indexOf('node_modules') !== -1;
}
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment