Skip to content

Commit 9a418d3

Browse files
HazATjanicduplessis
authored andcommitted
Generate correct source map if hermes not enabled (facebook#25700)
1 parent 856b438 commit 9a418d3

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

react.gradle

+2-9
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ afterEvaluate {
126126
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
127127
commandLine("cmd", "/c", *nodeExecutableAndArgs, cliPath, bundleCommand, "--platform", "android", "--dev", "${devEnabled}",
128128
"--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir,
129-
"--sourcemap-output", jsPackagerSourceMapFile, *extraArgs)
129+
"--sourcemap-output", enableHermes ? jsPackagerSourceMapFile : jsOutputSourceMapFile, *extraArgs)
130130
} else {
131131
commandLine(*nodeExecutableAndArgs, cliPath, bundleCommand, "--platform", "android", "--dev", "${devEnabled}",
132132
"--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir,
133-
"--sourcemap-output", jsPackagerSourceMapFile, *extraArgs)
133+
"--sourcemap-output", enableHermes ? jsPackagerSourceMapFile : jsOutputSourceMapFile, *extraArgs)
134134
}
135135

136136
if (enableHermes) {
@@ -167,13 +167,6 @@ afterEvaluate {
167167
}
168168
}
169169
}
170-
} else {
171-
doLast {
172-
ant.move(
173-
file: jsPackagerSourceMapFile,
174-
tofile: jsOutputSourceMapFile
175-
);
176-
}
177170
}
178171

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

0 commit comments

Comments
 (0)