diff --git a/compiler/src/compile_info.ts b/compiler/src/compile_info.ts index b9ea5ba..bb6b968 100644 --- a/compiler/src/compile_info.ts +++ b/compiler/src/compile_info.ts @@ -202,6 +202,17 @@ export class ResultStates { } this.printResult(); }); + + compiler.hooks.watchRun.tap('Listening State', (compiler: Compiler) => { + if (compiler.modifiedFiles) { + const isTsAndEtsFile: boolean = [...compiler.modifiedFiles].some((item: string) => { + return /.(ts|ets)$/.test(item); + }); + if (!isTsAndEtsFile) { + process.env.watchTs = 'end'; + } + } + }); } private printDiagnostic(diagnostic: ts.Diagnostic): void {