File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const defaults = {
26
26
compiledIn : true ,
27
27
done : null ,
28
28
minimal : env . minimalCLI ,
29
- stream : process . stderr ,
29
+ stream : null ,
30
30
} ;
31
31
32
32
const hasRunning = ( ) => Object . values ( sharedState ) . find ( ( s ) => s . isRunning ) ;
@@ -62,6 +62,10 @@ export default class WebpackBarPlugin extends webpack.ProgressPlugin {
62
62
return sharedState [ this . options . name ] ;
63
63
}
64
64
65
+ get stream ( ) {
66
+ return this . options . stream || process . stderr ;
67
+ }
68
+
65
69
apply ( compiler ) {
66
70
super . apply ( compiler ) ;
67
71
@@ -84,7 +88,7 @@ export default class WebpackBarPlugin extends webpack.ProgressPlugin {
84
88
if ( this . options . profile ) {
85
89
const stats = this . state . profile . getStats ( ) ;
86
90
const statsStr = formatStats ( stats ) ;
87
- this . options . stream . write ( `\n${ statsStr } \n` ) ;
91
+ this . stream . write ( `\n${ statsStr } \n` ) ;
88
92
}
89
93
90
94
if ( typeof this . options . done === 'function' ) {
@@ -141,7 +145,7 @@ export default class WebpackBarPlugin extends webpack.ProgressPlugin {
141
145
return ;
142
146
}
143
147
144
- const columns = this . options . stream . columns || 80 ;
148
+ const columns = this . stream . columns || 80 ;
145
149
146
150
const stateLines = _ . sortBy ( Object . keys ( sharedState ) , ( n ) => n ) . map (
147
151
( name ) => {
You can’t perform that action at this time.
0 commit comments