fix hotreload 场景异常

Signed-off-by: BoJiang <jiangbo91@huawei.com>
Change-Id: Id33d00ba048261959a2b111d0849bcfcbe5eae45
This commit is contained in:
BoJiang 2024-08-31 11:49:07 +08:00
parent 1451b479d8
commit dbc84776a0

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 {