Skip to content

Instantly share code, notes, and snippets.

@RB-Lab
Created November 9, 2015 13:31
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 RB-Lab/720cc438b8541d1cce13 to your computer and use it in GitHub Desktop.
Save RB-Lab/720cc438b8541d1cce13 to your computer and use it in GitHub Desktop.
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
filename: 'javascript/vendor.[chunkhash].js',
minChunks: module => {
return module.resource &&
module.resource.indexOf(path.resolve(__dirname, '../node_modules')) === 0;
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment