File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 9
9
10
10
'use strict' ;
11
11
12
- const ProgressPlugin = require ( 'webpack' ) . ProgressPlugin ;
12
+ const path = require ( 'path' ) ;
13
+
14
+ let ProgressPlugin ;
15
+ if ( __dirname . indexOf ( path . join ( 'packages' , 'react-dev-utils' ) ) !== - 1 ) {
16
+ ProgressPlugin = require ( '../react-scripts/node_modules/webpack' ) . ProgressPlugin ;
17
+ } else {
18
+ ProgressPlugin = require ( 'webpack' ) . ProgressPlugin ;
19
+ }
13
20
const ProgressBar = require ( 'progress' ) ;
14
21
const chalk = require ( 'chalk' ) ;
15
22
@@ -22,7 +29,7 @@ function BuildProgressPlugin() {
22
29
} )
23
30
return new ProgressPlugin ( function ( percent , msg ) {
24
31
if ( percent === 1 ) msg = 'completed' ;
25
- bar . update ( percent , { msg : msg } ) ;
32
+ bar . update ( percent , { msg } ) ;
26
33
if ( percent === 1 ) bar . terminate ( ) ;
27
34
} ) ;
28
35
}
Original file line number Diff line number Diff line change 29
29
"opn" : " 4.0.2" ,
30
30
"progress" : " 1.1.8" ,
31
31
"sockjs-client" : " 1.0.3" ,
32
- "strip-ansi" : " 3.0.1" ,
32
+ "strip-ansi" : " 3.0.1"
33
+ },
34
+ "peerDependencies" : {
33
35
"webpack" : " ^1.13.2"
34
36
}
35
37
}
You can’t perform that action at this time.
0 commit comments