!3730 fix hotreload 场景异常

Merge pull request !3730 from Bo Jiang/bugfix
This commit is contained in:
openharmony_ci 2024-08-31 09:06:01 +00:00 committed by Gitee
commit 1507d161a8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -37,7 +37,7 @@ import { ShouldEnableDebugLine } from '../ets_ui/rollup-plugin-ets-typescript';
export function watchChangeFiles() {
function addFileToCache(this: any, key: string, id: string) {
let modifiedFiles: string[] = [];
if (this.cache && this.cache.has(key)) {
if (!projectConfig.hotReload && this.cache && this.cache.has(key)) {
modifiedFiles = this.cache.get(key);
modifiedFiles.push(id);
} else {