Skip to content

Instantly share code, notes, and snippets.

@loveky
Created May 5, 2018 06:10
Show Gist options
  • Save loveky/3a2cbb393cbae5466da9bf1b018e8d81 to your computer and use it in GitHub Desktop.
Save loveky/3a2cbb393cbae5466da9bf1b018e8d81 to your computer and use it in GitHub Desktop.
extract all modules under node_modules referenced by entry chunks to a separate vender chunk
splitChunks: {
cacheGroups: {
commons: {
test: /[\\/]node_modules[\\/]/,
name: 'vendor',
chunks: 'all',
},
},
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment