File tree 3 files changed +31
-3
lines changed
3 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 1
1
.DS_Store
2
2
node_modules
3
3
public /bundle. *
4
+ public /libs_ *
5
+ public /runtime. *
6
+ public /polyfills. *
4
7
package-lock.json
5
- yarn.lock
8
+ yarn.lock
Original file line number Diff line number Diff line change @@ -5,9 +5,10 @@ module.exports = {
5
5
'@babel/preset-env' ,
6
6
{
7
7
loose : true ,
8
- /** Only parse modules if testing. If not, let webpack handle it */
8
+ // Only parse modules if testing. If not, let webpack handle it
9
9
modules : false ,
10
- debug : true ,
10
+ // set to true to see which polyfill is added to each file
11
+ debug : false ,
11
12
forceAllTransforms : true ,
12
13
useBuiltIns : 'usage' ,
13
14
corejs : { version : 3 , proposals : true } ,
Original file line number Diff line number Diff line change @@ -61,4 +61,28 @@ module.exports = {
61
61
} ) ,
62
62
] ,
63
63
devtool : prod ? false : 'source-map' ,
64
+ optimization : {
65
+ // create a separate chunk for webpack runtime
66
+ runtimeChunk : { name : 'runtime' } ,
67
+ splitChunks : {
68
+ chunks : 'all' ,
69
+ minSize : 0 ,
70
+ minChunks : 1 ,
71
+ automaticNameDelimiter : '_' ,
72
+ cacheGroups : {
73
+ vendors : false ,
74
+ // node_modules thingies go to 'lib'
75
+ libs : {
76
+ test : / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] / ,
77
+ priority : - 10 ,
78
+ } ,
79
+ // Chunk that contains used polyfills
80
+ polyfills : {
81
+ test : / c o r e - j s / ,
82
+ name : 'polyfills' ,
83
+ priority : 10 ,
84
+ } ,
85
+ } ,
86
+ } ,
87
+ } ,
64
88
} ;
You can’t perform that action at this time.
0 commit comments