File tree Expand file tree Collapse file tree 1 file changed +19
-11
lines changed Expand file tree Collapse file tree 1 file changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,26 @@ const cssGenPath = path.dirname(
10
10
path . dirname ( require . resolve ( 'jetpack-boost-critical-css-gen' ) )
11
11
) ;
12
12
13
- const cssGenCopyPatterns = [
14
- {
15
- from : path . join ( cssGenPath , 'dist/bundle.js' ) ,
16
- to : 'critical-css-gen.js' ,
17
- } ,
18
- ] ;
13
+ let cssGenCopyPatterns ;
19
14
20
- if ( ! isProduction ) {
21
- cssGenCopyPatterns . push ( {
22
- from : path . join ( cssGenPath , 'dist/bundle.js.map' ) ,
23
- to : 'critical-css-gen.js.map' ,
24
- } ) ;
15
+ if ( isProduction ) {
16
+ cssGenCopyPatterns = [
17
+ {
18
+ from : path . join ( cssGenPath , 'dist/bundle.js' ) ,
19
+ to : 'critical-css-gen.js' ,
20
+ } ,
21
+ ] ;
22
+ } else {
23
+ cssGenCopyPatterns = [
24
+ {
25
+ from : path . join ( cssGenPath , 'dist/bundle.full.js' ) ,
26
+ to : 'critical-css-gen.js' ,
27
+ } ,
28
+ {
29
+ from : path . join ( cssGenPath , 'dist/bundle.full.js.map' ) ,
30
+ to : 'bundle.full.js.map' ,
31
+ } ,
32
+ ] ;
25
33
}
26
34
27
35
const imageGuideCopyPatterns = [
You can’t perform that action at this time.
0 commit comments