inconsistent arguments to "bundle" command between android and iOS build scripts
See original GitHub issueDescription:
As of 0.61.5
, the Android/Gradle react.gradle
script calls react-native bundle
with the --sourcemap-output
argument. In other words, it includes building source maps by default. However, the iOS/Xcode equivalent does not. Would it be possible to add support for the latter to also pass the --sourcemap-output
value by default?
I realize both include ways to pass “extra args” to the react native bundle
call, but in our case, we have a whitespace character in our Xcode scheme names (an unintended effect of following the suggestion in the react-native-config approach), and there does not seem to be a way to properly escape it in the $EXTRA_PACKAGER_ARGS
value so that the script will interpret it properly (here is an explanation of this issue).
Nevertheless, it seems prudent for both scripts to behave consistently when bundling the js code. (It seems the --sourcemap-output
arg was added to the android script about six months ago.)
React Native version:
Run `react-native info` in your terminal and copy the results here.
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
Memory: 209.79 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.17.3 - ~/.nvm/versions/node/v10.16.0/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29
Build Tools: 28.0.2, 28.0.3, 29.0.0
System Images: android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.3/11C29 - /usr/bin/xcodebuild
npmPackages:
react: ^16.9.0 => 16.12.0
react-native: ^0.61.5 => 0.61.5
npmGlobalPackages:
react-native-cli: 2.0.1
react-native: 0.59.10
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Issues without reproduction steps or code are likely to stall.
- Compile binary code on Android Studio/Gradle
- Compile binary code on Xcode/xcodebuild
- Examine the output, or add debugging output to the
react.gradle
orreact-native-xcode.sh
scripts to see how they invoke thereact-native bundle
command.
Expected Results
Expect both bundler commands to be consistent in the arguments passed to the bundler-- e.g. both should create source maps.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:5 (2 by maintainers)
Top GitHub Comments
Thanks for catching this! Tagging as a “Good first issue” in case anyone wants to send a PR and add this to iOS.
As it doesn’t seem to be actively worked on, I tried to come up with some solution to that. Could anyone give me feedback on my current changes? https://github.com/facebook/react-native/pull/30573