From e9ad2caba7b57ec3dd6a7e40751ee6e5b2839741 Mon Sep 17 00:00:00 2001 From: Dori <79495204+minizzang@users.noreply.github.com> Date: Mon, 2 Dec 2024 19:25:40 +0900 Subject: [PATCH] [CLI] Fix sourcemap output filename (#43) **Fix sourcemapOutput Overwrite** There's an issue where the sourcemap output is overwritten when both the sourcemap output and output directory are used together in the CLI. --- cli/script/command-executor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/script/command-executor.ts b/cli/script/command-executor.ts index 97d369e..30b7521 100644 --- a/cli/script/command-executor.ts +++ b/cli/script/command-executor.ts @@ -1326,8 +1326,8 @@ export const releaseReact = (command: cli.IReleaseReactCommand): Promise = ? Q(command.appStoreVersion) : getReactNativeProjectAppVersion(command, projectName); - if (command.outputDir) { - command.sourcemapOutput = path.join(command.outputDir, bundleName + ".map"); + if (command.sourcemapOutput && !command.sourcemapOutput.endsWith(".map")) { + command.sourcemapOutput = path.join(command.sourcemapOutput, bundleName + ".map"); } return appVersionPromise;