@@ -44,47 +44,45 @@ module.exports = {
4444 minChunks : 2 ,
4545 cacheGroups : {
4646 automaticNamePrefix : 'chunk' ,
47- components : {
48- test : / [ \\ / ] c o m p o n e n t s [ \\ / ] / ,
49- name : 'components' ,
50- priority : 14 ,
51- reuseExistingChunk : true ,
52- minChunks : process . env . NODE_ENV === 'production' ? 1 : 2 ,
53- chunks : 'initial' ,
54- } ,
5547 mix1 : {
48+ test : ( module , chunks ) => {
49+ return (
50+ module . resource &&
51+ ( module . resource . includes ( 'components' ) ||
52+ / \/ n o d e _ m o d u l e s \/ r e a c t - b o o t s t r a p \/ / . test ( module . resource ) )
53+ ) ;
54+ } ,
5655 name : 'chunk-mix1' ,
57- test : / [ \/ ] n o d e _ m o d u l e s [ \/ ] ( i 1 8 n e x t | l o d a s h | m a r k e d | n e x t - s h a r e ) [ \/ ] / ,
5856 filename : 'static/js/[name].[contenthash:8].chunk.js' ,
59- priority : 12 ,
57+ priority : 14 ,
6058 reuseExistingChunk : true ,
61- minChunks : 1 ,
59+ minChunks : process . env . NODE_ENV === 'production' ? 1 : 2 ,
6260 chunks : 'initial' ,
6361 } ,
6462 mix2 : {
6563 name : 'chunk-mix2' ,
66- test : / [ \/ ] n o d e _ m o d u l e s [ \/ ] ( @ r e m i x - r u n | @ r e s t a r t | a x i o s | d i f f ) [ \/ ] / ,
64+ test : / [ \/ ] n o d e _ m o d u l e s [ \/ ] ( i 1 8 n e x t | l o d a s h | m a r k e d | n e x t - s h a r e ) [ \/ ] / ,
6765 filename : 'static/js/[name].[contenthash:8].chunk.js' ,
68- priority : 11 ,
66+ priority : 13 ,
6967 reuseExistingChunk : true ,
7068 minChunks : 1 ,
7169 chunks : 'initial' ,
7270 } ,
73- reactBootstrap : {
74- name : 'react-bootstrap ' ,
75- test : / [ \/ ] n o d e _ m o d u l e s [ \/ ] ( r e a c t - b o o t s t r a p ) [ \/ ] / ,
71+ mix3 : {
72+ name : 'chunk-mix3 ' ,
73+ test : / [ \/ ] n o d e _ m o d u l e s [ \/ ] ( @ r e m i x - r u n | @ r e s t a r t | a x i o s | d i f f ) [ \/ ] / ,
7674 filename : 'static/js/[name].[contenthash:8].chunk.js' ,
77- priority : 11 ,
75+ priority : 12 ,
76+ reuseExistingChunk : true ,
7877 minChunks : 1 ,
7978 chunks : 'initial' ,
80- reuseExistingChunk : true ,
8179 } ,
8280 codemirror : {
8381 name : 'codemirror' ,
8482 test : / [ \/ ] n o d e _ m o d u l e s [ \/ ] ( \@ c o d e m i r r o r ) [ \/ ] / ,
85- priority : 9 ,
83+ priority : 10 ,
8684 reuseExistingChunk : true ,
87- minChunks : 1 ,
85+ minChunks : process . env . NODE_ENV === 'production' ? 1 : 2 ,
8886 chunks : 'initial' ,
8987 enforce : true ,
9088 } ,
@@ -93,15 +91,15 @@ module.exports = {
9391 test : / [ \/ ] n o d e _ m o d u l e s [ \/ ] ( \@ l e z e r ) [ \/ ] / ,
9492 priority : 9 ,
9593 reuseExistingChunk : true ,
96- minChunks : 1 ,
94+ minChunks : process . env . NODE_ENV === 'production' ? 1 : 2 ,
9795 chunks : 'initial' ,
9896 enforce : true ,
9997 } ,
10098 reactDom : {
10199 name : 'react-dom' ,
102100 test : / [ \/ ] n o d e _ m o d u l e s [ \/ ] ( r e a c t - d o m ) [ \/ ] / ,
103101 filename : 'static/js/[name].[contenthash:8].chunk.js' ,
104- priority : 7 ,
102+ priority : 8 ,
105103 reuseExistingChunk : true ,
106104 chunks : 'all' ,
107105 enforce : true ,
0 commit comments