File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 61
61
"sass-loader" : " ^7.1.0" ,
62
62
"style-loader" : " ^0.23.1" ,
63
63
"uglifyjs-webpack-plugin" : " ^1.2.7" ,
64
- "webpack" : " 4.16 .3" ,
65
- "webpack-cli" : " ^3.1.0 " ,
64
+ "webpack" : " 4.26 .3" ,
65
+ "webpack-cli" : " ^3.1.2 " ,
66
66
"workbox-build" : " ^3.4.1" ,
67
67
"yargs" : " ^12.0.1"
68
68
},
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const explorer = cosmiconfig('patternlab');
15
15
// @todo : wire these two ocnfigs up to use cosmicconfig!
16
16
const defaultConfig = {
17
17
buildDir : './dist' ,
18
- prod : false , // or false for local dev
18
+ prod : true , // or false for local dev
19
19
sourceMaps : true ,
20
20
publicPath : '/styleguide/' ,
21
21
} ;
@@ -180,10 +180,28 @@ module.exports = async function() {
180
180
] ,
181
181
} ,
182
182
cache : true ,
183
- mode : config . prod ? 'production' : 'development' ,
183
+ // mode: config.prod ? 'production' : 'development',
184
+ mode : 'development' , // temp workaround till strange rendering issues with full `production` mode are switched on in Webpack
184
185
optimization : {
186
+ minimize : true ,
187
+ occurrenceOrder : true ,
188
+ namedChunks : true ,
189
+ removeAvailableModules : true ,
190
+ removeEmptyChunks : true ,
191
+ nodeEnv : 'production' ,
185
192
mergeDuplicateChunks : true ,
186
193
concatenateModules : true ,
194
+ splitChunks : {
195
+ chunks : 'async' ,
196
+ cacheGroups : {
197
+ vendors : {
198
+ test : / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] / ,
199
+ name : 'vendors' ,
200
+ chunks : 'async' ,
201
+ reuseExistingChunk : true ,
202
+ } ,
203
+ } ,
204
+ } ,
187
205
minimizer : config . prod
188
206
? [
189
207
new UglifyJsPlugin ( {
You can’t perform that action at this time.
0 commit comments