Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laruiss/3ded501b7d633511c24d91249f51413d to your computer and use it in GitHub Desktop.
Save laruiss/3ded501b7d633511c24d91249f51413d to your computer and use it in GitHub Desktop.
// Split the code between 'vendors' which will contain all the
// modules from node_modules and 'main' which will contain our code
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks(module) {
return module.context && module.context.includes('node_modules');
},
}),
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment