Skip to content

Instantly share code, notes, and snippets.

@jozsefs
Last active June 20, 2017 06:06
Show Gist options
  • Select an option

  • Save jozsefs/ec638c55af3f82f0d664ad1a316fc8af to your computer and use it in GitHub Desktop.

Select an option

Save jozsefs/ec638c55af3f82f0d664ad1a316fc8af to your computer and use it in GitHub Desktop.
webpack better vendor hashing config
module.exports = {
output: {
filename: '[name]-[chunkhash].js',
},
plugins: [
new webpack.HashedModuleIdsPlugin(),
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: m => /node_modules/.test(m.context),
}),
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
}),
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment