@@ -56,17 +56,17 @@ function setupHooks(context) {
5656 context . state = true ;
5757 context . stats = stats ;
5858
59- // For plugin support we should print nothing, because webpack/webpack-cli/webpack-dev-server will print them on using `stats.toString()`
60- if ( ! context . isPlugin ) {
61- // Do the stuff in nextTick, because bundle may be invalidated if a change happened while compiling
62- process . nextTick ( ( ) => {
63- const { compiler, logger, options, state, callbacks } = context ;
64-
65- // Check if still in valid state
66- if ( ! state ) {
67- return ;
68- }
59+ // Do the stuff in nextTick, because bundle may be invalidated if a change happened while compiling
60+ process . nextTick ( ( ) => {
61+ const { compiler, logger, options, state, callbacks } = context ;
62+
63+ // Check if still in valid state
64+ if ( ! state ) {
65+ return ;
66+ }
6967
68+ // For plugin support we should print nothing, because webpack/webpack-cli/webpack-dev-server will print them on using `stats.toString()`
69+ if ( ! context . isPlugin ) {
7070 logger . log ( "Compilation finished" ) ;
7171
7272 const isMultiCompilerMode = Boolean (
@@ -144,15 +144,15 @@ function setupHooks(context) {
144144 // eslint-disable-next-line no-console
145145 console . log ( printedStats ) ;
146146 }
147+ }
147148
148- context . callbacks = [ ] ;
149+ context . callbacks = [ ] ;
149150
150- // Execute callback that are delayed
151- for ( const callback of callbacks ) {
152- callback ( stats ) ;
153- }
154- } ) ;
155- }
151+ // Execute callback that are delayed
152+ for ( const callback of callbacks ) {
153+ callback ( stats ) ;
154+ }
155+ } ) ;
156156 }
157157
158158 // eslint-disable-next-line prefer-destructuring
0 commit comments