File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -57,14 +57,19 @@ function formatMessage(message) {
57
57
. replace ( './~/css-loader!./~/postcss-loader!' , '' ) ;
58
58
}
59
59
60
- var compiler = webpack ( config , handleCompile ) ;
61
- compiler . plugin ( 'done' , function ( stats ) {
62
- // Clear the console and reset the cursor
60
+ function clearConsole ( ) {
63
61
process . stdout . write ( '\x1B[2J\x1B[0f' ) ;
62
+ }
64
63
64
+ var compiler = webpack ( config , handleCompile ) ;
65
+ compiler . plugin ( 'invalid' , function ( ) {
66
+ clearConsole ( ) ;
67
+ console . log ( 'Compiling...' ) ;
68
+ } ) ;
69
+ compiler . plugin ( 'done' , function ( stats ) {
70
+ clearConsole ( ) ;
65
71
var hasErrors = stats . hasErrors ( ) ;
66
72
var hasWarnings = stats . hasWarnings ( ) ;
67
-
68
73
if ( ! hasErrors && ! hasWarnings ) {
69
74
console . log ( chalk . green ( 'Compiled successfully!' ) ) ;
70
75
console . log ( ) ;
You can’t perform that action at this time.
0 commit comments