Skip to content

Commit

Permalink
Generate correct source map if hermes not enabled (facebook#25700)
Browse files Browse the repository at this point in the history
  • Loading branch information
HazAT authored and janicduplessis committed Jul 18, 2019
1 parent 856b438 commit 9a418d3
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions react.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ afterEvaluate {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine("cmd", "/c", *nodeExecutableAndArgs, cliPath, bundleCommand, "--platform", "android", "--dev", "${devEnabled}",
"--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir,
"--sourcemap-output", jsPackagerSourceMapFile, *extraArgs)
"--sourcemap-output", enableHermes ? jsPackagerSourceMapFile : jsOutputSourceMapFile, *extraArgs)
} else {
commandLine(*nodeExecutableAndArgs, cliPath, bundleCommand, "--platform", "android", "--dev", "${devEnabled}",
"--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir,
"--sourcemap-output", jsPackagerSourceMapFile, *extraArgs)
"--sourcemap-output", enableHermes ? jsPackagerSourceMapFile : jsOutputSourceMapFile, *extraArgs)
}

if (enableHermes) {
Expand Down Expand Up @@ -167,13 +167,6 @@ afterEvaluate {
}
}
}
} else {
doLast {
ant.move(
file: jsPackagerSourceMapFile,
tofile: jsOutputSourceMapFile
);
}
}

enabled config."bundleIn${targetName}" != null
Expand Down

0 comments on commit 9a418d3

Please sign in to comment.