@@ -65,7 +65,7 @@ const makeRow = (a: string, b: string, c: string): string => {
6565class LogFilesizeWebpackPlugin {
6666 private options : IOptions ;
6767
68- public constructor ( options : IOptions ) {
68+ public constructor ( options = { } as IOptions ) {
6969 this . options = this . mergeOptions ( options , defaultOptions ) ;
7070 }
7171 public apply = ( compiler : Compiler ) => {
@@ -120,22 +120,24 @@ class LogFilesizeWebpackPlugin {
120120 } ) ;
121121
122122 if ( this . options . errors && json . errors . length ) {
123- ui . div ( chalk . red ( 'Error: ' ) + '\n' + json . errors . join ( '\n' ) ) ;
123+ ui . div ( chalk . red . bold ( 'Error: ' ) + '\n' + json . errors . join ( '\n' ) ) ;
124+ ui . div ( '\n' ) ;
124125 }
125126 if ( this . options . warnings && json . warnings . length ) {
126- ui . div ( chalk . yellow ( 'Warning: ' ) + '\n' + json . warnings . join ( '\n' ) ) ;
127+ ui . div ( chalk . yellow . bold ( 'Warning: ' ) + '\n' + json . warnings . join ( '\n' ) ) ;
128+ ui . div ( '\n' ) ;
127129 }
128130 if ( this . options . version ) {
129- ui . div ( chalk . white ( 'Version: webpack ' ) + json . version ) ;
131+ ui . div ( chalk . white . bold ( 'Version: ' ) + ' webpack ' + json . version ) ;
130132 }
131133 if ( this . options . hash ) {
132- ui . div ( chalk . white ( 'Hash: ' ) + json . hash ) ;
134+ ui . div ( chalk . white . bold ( 'Hash: ' ) + json . hash ) ;
133135 }
134136 if ( this . options . time ) {
135- ui . div ( chalk . white ( 'Time: ' ) + json . time + 'ms' ) ;
137+ ui . div ( chalk . white . bold ( 'Time: ' ) + json . time + 'ms' ) ;
136138 }
137139 if ( this . options . builtAt ) {
138- ui . div ( chalk . white ( 'Built At: ' ) + new Date ( json . builtAt ! ) ) ;
140+ ui . div ( chalk . white . bold ( 'Built At: ' ) + new Date ( json . builtAt ! ) ) ;
139141 }
140142 ui . div ( '\n' ) ;
141143 ui . div (
0 commit comments