!1047 fix js file two amend not render

Merge pull request !1047 from Bo Jiang/master
This commit is contained in:
openharmony_ci
2022-09-02 06:52:10 +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 {