!1056 fix js file two amend not render

Merge pull request !1056 from Bo Jiang/cherry-pick-1662085637
This commit is contained in:
openharmony_ci
2022-09-05 06:43:15 +00:00
committed by Gitee
+11
View File
@@ -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 {