diff --git a/compiler/src/compile_info.ts b/compiler/src/compile_info.ts index 681f5f6..16b2ba4 100644 --- a/compiler/src/compile_info.ts +++ b/compiler/src/compile_info.ts @@ -239,6 +239,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 {