From d6b2b91a2ecbb8bf8af908182a1803cbfc88d7e8 Mon Sep 17 00:00:00 2001 From: zhangrengao Date: Sat, 27 Aug 2022 09:58:00 +0800 Subject: [PATCH] Fix path is cache path Signed-off-by: zhangrengao Change-Id: I71bc5ccb3b8bfa2d86f6d8fa4bec398061b7fa0c --- compiler/src/gen_abc_plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/gen_abc_plugin.ts b/compiler/src/gen_abc_plugin.ts index 3fff1c0..4c4f7f1 100644 --- a/compiler/src/gen_abc_plugin.ts +++ b/compiler/src/gen_abc_plugin.ts @@ -733,7 +733,7 @@ function writeHashJson(): void { mkdirsSync(path.dirname(abcFile)); fs.copyFileSync(cacheAbcFilePath, abcFile); } - if (fs.existsSync(intermediateJsBundle[i].path)) { + if (process.env.cachePath === undefined && fs.existsSync(intermediateJsBundle[i].path)) { fs.unlinkSync(intermediateJsBundle[i].path); } }