Skip to content

Commit

Permalink
[CLI] Fix sourcemap output filename (#43)
Browse files Browse the repository at this point in the history
**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.
  • Loading branch information
minizzang authored Dec 2, 2024
1 parent 5d42d39 commit e9ad2ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/script/command-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1326,8 +1326,8 @@ export const releaseReact = (command: cli.IReleaseReactCommand): Promise<void> =
? 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;
Expand Down

0 comments on commit e9ad2ca

Please sign in to comment.