Created
August 18, 2016 21:51
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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