Skip to content

Instantly share code, notes, and snippets.

@a-s-o
Created August 18, 2016 21:51
Show Gist options
  • Save a-s-o/19b10652ec60d0424a79071313f34ad3 to your computer and use it in GitHub Desktop.
Save a-s-o/19b10652ec60d0424a79071313f34ad3 to your computer and use it in GitHub Desktop.
Move lodash chunks into a specified entry file if it is used in more than one module
new webpack.optimize.CommonsChunkPlugin({
name: 'someEntryFile',
minChunks (module, count) {
return module.resource && module.resource.indexOf('lodash') !== -1 && count > 1;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment