@@ -318,36 +318,38 @@ module.exports = function() {
318
318
} )
319
319
) ;
320
320
321
- webpackConfig . plugins . push (
322
- new CriticalCssPlugin ( {
323
- base : path . resolve ( __dirname , config . buildDir ) ,
324
- src : 'index.html' ,
325
- dest : 'index.html' ,
326
- inline : true ,
327
- minify : true ,
328
- extract : false ,
329
- width : 1300 ,
330
- height : 900 ,
331
- penthouse : {
332
- keepLargerMediaQueries : true ,
321
+ if ( ! argv . watch ) {
322
+ webpackConfig . plugins . push (
323
+ new CriticalCssPlugin ( {
324
+ base : path . resolve ( __dirname , config . buildDir ) ,
325
+ src : 'index.html' ,
326
+ dest : 'index.html' ,
327
+ inline : true ,
328
+ minify : true ,
329
+ extract : false ,
330
+ width : 1300 ,
331
+ height : 900 ,
332
+ penthouse : {
333
+ keepLargerMediaQueries : true ,
333
334
334
- // @todo : troubleshoot why forceInclude works w/ Penthouse directly but not w/ Critical
335
- forceInclude : [
336
- 'pl-logo' ,
337
- '.pl-c-logo' ,
338
- '.pl-c-logo__img' ,
339
- '.pl-c-body--theme-light' ,
340
- '.pl-c-body--theme-sidebar' ,
341
- '.pl-c-body--theme-sidebar .pl-c-viewport' ,
342
- '.pl-c-body--theme-density-compact' ,
343
- ] ,
344
- timeout : 30000 , // ms; abort critical CSS generation after this timeout
345
- maxEmbeddedBase64Length : 1000 ,
346
- renderWaitTime : 1000 ,
347
- blockJSRequests : false ,
348
- } ,
349
- } )
350
- ) ;
335
+ // @todo : troubleshoot why forceInclude works w/ Penthouse directly but not w/ Critical
336
+ forceInclude : [
337
+ 'pl-logo' ,
338
+ '.pl-c-logo' ,
339
+ '.pl-c-logo__img' ,
340
+ '.pl-c-body--theme-light' ,
341
+ '.pl-c-body--theme-sidebar' ,
342
+ '.pl-c-body--theme-sidebar .pl-c-viewport' ,
343
+ '.pl-c-body--theme-density-compact' ,
344
+ ] ,
345
+ timeout : 30000 , // ms; abort critical CSS generation after this timeout
346
+ maxEmbeddedBase64Length : 1000 ,
347
+ renderWaitTime : 1000 ,
348
+ blockJSRequests : false ,
349
+ } ,
350
+ } )
351
+ ) ;
352
+ }
351
353
352
354
return resolve ( webpackConfig ) ;
353
355
} ) ;
0 commit comments