@@ -39,15 +39,18 @@ class CLIPlugin {
3939
4040 setupHelpfulOutput ( compiler ) {
4141 const pluginName = 'webpack-cli' ;
42- const getCompilationName = ( ) => ( compiler . name ? ` '${ compiler . name } '` : '' ) ;
42+ const getCompilationName = ( ) => ( compiler . name ? `'${ compiler . name } '` : '' ) ;
4343
4444 const { configPath } = this . options ;
4545
4646 compiler . hooks . run . tap ( pluginName , ( ) => {
47+ const name = getCompilationName ( ) ;
48+
49+ this . logger . log ( `Compiler${ name ? ` ${ name } ` : '' } starting...` ) ;
50+
4751 if ( configPath ) {
48- this . logger . log ( `Using config '${ configPath } '` ) ;
52+ this . logger . log ( `Compiler ${ name ? ` ${ name } ` : '' } is using config: '${ configPath } '` ) ;
4953 }
50- this . logger . log ( `Compilation${ getCompilationName ( ) } starting...` ) ;
5154 } ) ;
5255
5356 compiler . hooks . watchRun . tap ( pluginName , ( compiler ) => {
@@ -57,11 +60,13 @@ class CLIPlugin {
5760 this . logger . warn ( 'You are using "bail" with "watch". "bail" will still exit webpack when the first error is found.' ) ;
5861 }
5962
63+ const name = getCompilationName ( ) ;
64+
65+ this . logger . log ( `Compiler${ name ? ` ${ name } ` : '' } starting...` ) ;
66+
6067 if ( configPath ) {
61- this . logger . log ( `Using config ${ configPath } ` ) ;
68+ this . logger . log ( `Compiler ${ name ? ` ${ name } ` : '' } is using config: ' ${ configPath } ' ` ) ;
6269 }
63-
64- this . logger . log ( `Compilation${ getCompilationName ( ) } starting...` ) ;
6570 } ) ;
6671
6772 compiler . hooks . invalid . tap ( pluginName , ( filename , changeTime ) => {
@@ -72,11 +77,13 @@ class CLIPlugin {
7277 } ) ;
7378
7479 ( compiler . webpack ? compiler . hooks . afterDone : compiler . hooks . done ) . tap ( pluginName , ( ) => {
75- this . logger . log ( `Compilation${ getCompilationName ( ) } finished` ) ;
80+ const name = getCompilationName ( ) ;
81+
82+ this . logger . log ( `Compiler${ name ? ` ${ name } ` : '' } finished` ) ;
7683
7784 process . nextTick ( ( ) => {
7885 if ( compiler . watchMode ) {
79- this . logger . log ( `Compiler${ getCompilationName ( ) } is watching files for updates...` ) ;
86+ this . logger . log ( `Compiler${ name ? ` ${ name } ` : '' } is watching files for updates...` ) ;
8087 }
8188 } ) ;
8289 } ) ;
0 commit comments