From 7561fbdf93a7f69c00a46ed75dfff4a93a5a44c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=9B=B9=E5=AE=87?= Date: Fri, 15 Aug 2025 17:23:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E8=A3=81=E5=89=AA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王曹宇 --- build-tools/delete_systemapi_plugin.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build-tools/delete_systemapi_plugin.js b/build-tools/delete_systemapi_plugin.js index cdc2a9656b..a482757f44 100644 --- a/build-tools/delete_systemapi_plugin.js +++ b/build-tools/delete_systemapi_plugin.js @@ -356,6 +356,11 @@ function isArkTsSpecialSyntax(content) { */ function tsTransform(utFiles, callback) { utFiles.forEach((url) => { + let content = fs.readFileSync(url, 'utf-8'); // 文件内容 + if (etsType === 'ets2') { + writeFile(url, content); + return; + } const relativePath = path.relative(inputDir, url); if (STATIC_API_DELETE_RULES.has(relativePath.replace(/\\/g, '/'))) { const content = processStaticFile(url); @@ -363,7 +368,6 @@ function tsTransform(utFiles, callback) { return; } const apiBaseName = path.basename(url); - let content = fs.readFileSync(url, 'utf-8'); // 文件内容 if (isArkTsSpecialSyntax(content)) { writeFile(url, content); return; -- Gitee