-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add extensibility point for passing additional args to packager #12863
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Extend `react-native-xcode.sh` to allow passing of additional args to bundle command. This is useful if you want to generate source maps for example. Here is an example that modifies the “Bundle React Native code and images” script phase: ```sh export NODE_BINARY=node export EXTRA_PACKAGER_ARGS="--sourcemap-output ${SRCROOT}/build/main.jsbundle.map" ./react-native-xcode.sh ``` Android’s `build.gradle` already have this extensibility point in the name of: ```gradle project.ext.react = [ extraPackagerArgs: [ ] ] ```
Ping @dlowder-salesforce. Can you please take a look? Thanks. |
@ligaz are there more extension points other than
|
@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
This should be landing shortly. We had some minor issues landing this internally but I've resolved them manually. |
Hey @hramos what's the state of this PR? |
@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
The original import failed due to some changes we made to our internal repository. This last one should import successfully. |
@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
1 similar comment
@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Any news about this @hramos ? I'm uncertain about the process, is there anything I can do to help? |
Hi there! The packager no longer lives in this repo. It now lives in https://github.com/facebook/metro-bundler. The reasoning for the split is explained here: #13976. If you're still interested in pursuing this PR, please open the PR on that repo! :) Thanks! |
@Froelund sorry this didn't get merged! It should be much easier to contribute to the packager now that it's separate. |
Did anyone create this issue on the new repo? Couldn't find it. cc @ligaz |
I believe this script still lives in this repo and not the packager one. @hramos how are we supposed to progress with this one? |
Original pull request: facebook#12863
Original pull request: facebook#12863
Summary: Original pull request: #12863 Useful for generating source maps, for example. Feature parity with Android, that already have this extensibility point on `build.gradle`: ``` project.ext.react = [ extraPackagerArgs: [...] ] ``` Xcode > Build Phases > Bundle React Native code and Images ``` export NODE_BINARY=node export EXTRA_PACKAGER_ARGS="--sourcemap-output ${SRCROOT}/build/main.jsbundle.map" ../node_modules/react-native/scripts/react-native-xcode.sh ``` [IOS] [FEATURE] [./react-native-xcode.sh] - Added $EXTRA_PACKAGER_ARGS extensibility point Closes #16933 Differential Revision: D6771709 Pulled By: yungsters fbshipit-source-id: a33614b45b1e3537daeb31504fdd3a402dc70ff0
Extend
react-native-xcode.sh
to allow passing of additional args tobundle command. This is useful if you want to generate source maps for
example.
Here is an example that modifies the “Bundle React Native code and
images” script phase:
Android’s
build.gradle
already have this extensibility point in the nameof: