Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function withCommonsChunk({ webpackConfig }) {
- const { splitChunks } = webpackConfig.optimization;
- if (splitChunks.cacheGroups == null) {
- splitChunks.cacheGroups = {};
- }
- splitChunks.cacheGroups.commons = {
- test: /[\\/]src[\\/]common[\\/]/,
- chunks: 'all',
- name: 'commons'
- }
- return webpackConfig;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement