From f96f78e103735c840cd1625cea7fe8d431bebefc Mon Sep 17 00:00:00 2001 From: yp9522 Date: Mon, 30 Jun 2025 17:25:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=85=B7=E9=93=BEso=E6=94=B6=E9=9B=86?= =?UTF-8?q?=EF=BC=8Cback=E6=96=87=E4=BB=B6=E5=AD=98=E5=82=A8=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: https://gitee.com/openharmony/developtools_ace_ets2bundle/issues/ICIW7S Signed-off-by: yp9522 --- .../ark_compiler/module/module_preload_file_utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/src/fast_build/ark_compiler/module/module_preload_file_utils.ts b/compiler/src/fast_build/ark_compiler/module/module_preload_file_utils.ts index bfe9b50ad..0e55b9b3e 100644 --- a/compiler/src/fast_build/ark_compiler/module/module_preload_file_utils.ts +++ b/compiler/src/fast_build/ark_compiler/module/module_preload_file_utils.ts @@ -49,6 +49,10 @@ export class PreloadFileModules { public static initialize(rollupObject: Object): void { this.projectConfig = Object.assign(rollupObject.share.arkProjectConfig, rollupObject.share.projectConfig); this.logger = CommonLogger.getInstance(rollupObject); + if (!this.projectConfig.isPreloadSoEnabled) { + this.needPreloadSo = false; + return; + } if (this.projectConfig.widgetCompile) { this.needPreloadSo = false; return; @@ -59,7 +63,7 @@ export class PreloadFileModules { } this.needPreloadSo = true; this.preloadFilePath = this.projectConfig.preloadSoFilePath; - this.preloadFilePathBack = this.preloadFilePath.replace('.json', '.backup.json'); + this.preloadFilePathBack = path.resolve(this.projectConfig.cachePath, `./preload.json`); } public static updatePreloadFileDataByItems(moduleRequest: string, ohmurl: string, moduleId: string): void { -- Gitee