Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. function withCommonsChunk({ webpackConfig }) {
  2. const { splitChunks } = webpackConfig.optimization;
  3.  
  4. if (splitChunks.cacheGroups == null) {
  5. splitChunks.cacheGroups = {};
  6. }
  7.  
  8. splitChunks.cacheGroups.commons = {
  9. test: /[\\/]src[\\/]common[\\/]/,
  10. chunks: 'all',
  11. name: 'commons'
  12. }
  13.  
  14. return webpackConfig;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement