File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
packages/cli/lib/lib/webpack Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' preact-cli ' : patch
3+ ---
4+
5+ Ensures TS warnings/errors are not hidden by console clearing
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ async function devBuild(env) {
3333 callback ( ) ;
3434 } ) ;
3535
36+ compiler . hooks . beforeCompile . tap ( 'CliDevPlugin' , ( ) => {
37+ if ( env [ 'clear' ] ) clear ( true ) ;
38+ } ) ;
39+
3640 compiler . hooks . done . tap ( 'CliDevPlugin' , stats => {
3741 let devServer = config . devServer ;
3842 let protocol = process . env . HTTPS || devServer . https ? 'https' : 'http' ;
@@ -43,8 +47,6 @@ async function devBuild(env) {
4347 let serverAddr = `${ protocol } ://${ host } :${ bold ( env . port ) } ` ;
4448 let localIpAddr = `${ protocol } ://${ ip . address ( ) } :${ bold ( env . port ) } ` ;
4549
46- if ( env [ 'clear' ] ) clear ( true ) ;
47-
4850 if ( stats . hasErrors ( ) ) {
4951 process . stdout . write ( red ( 'Build failed!\n\n' ) ) ;
5052 } else {
You can’t perform that action at this time.
0 commit comments