-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Allow rn-cli.config.js to specify the default transformer, again #9799
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
Conversation
|
By analyzing the blame information on this pull request, we identified @grabbou and @sam-swarr to be potential reviewers. |
|
Since this fixes a regression introduced in 0.32, can we get this uplifted at least to the 0.33-stable branch? |
|
also cc @davidaurelio for review |
Restores feature introduced in facebook#7961 after it's been paved partially by facebook#7899
7a93245 to
4a5f9e6
Compare
|
@philikon updated the pull request - view changes |
|
Ping? |
| }, { | ||
| command: '--transformer [string]', | ||
| description: 'Specify a custom transformer to be used (absolute path)', | ||
| default: require.resolve('../../packager/transformer'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable and simple that I think I can merge this. Just one question - why remove the default here? Could it break any code relying on the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the default for command line arguments is pricely the point here (and the fact that #7899 added them again is the regression from #7961). We want the transformer to be specified as followed:
- If specified on command line, use that
- If specified by
rn-cli.config.js, use that - Fallback to default configuration
For this fallback chain to work properly, there must not be a default value returned by the command line parser, otherwise we stop at (1) and never make it to (2).
|
Ah cool, I misunderstood that this PR removes the "Fallback to default configuration". Thanks for the explanation! @facebook-github-bot shipit |
|
Thanks for importing. If you are an FB employee go to Phabricator to review internal test results. |
Summary: Restores feature introduced in facebook#7961 after it's been paved partially by facebook#7899 **Test Plan:** ran example in https://github.com/philikon/ReactNativify against a React Native with and without this patch Closes facebook#9799 Differential Revision: D3852601 Pulled By: mkonicek fbshipit-source-id: fc3c80bdb254145fefa870eea1828b4ef33f9297
Summary: Restores feature introduced in #7961 after it's been paved partially by #7899 **Test Plan:** ran example in https://github.com/philikon/ReactNativify against a React Native with and without this patch Closes facebook/react-native#9799 Differential Revision: D3852601 Pulled By: mkonicek fbshipit-source-id: fc3c80bdb254145fefa870eea1828b4ef33f9297
Restores feature introduced in #7961 after it's been paved partially by #7899
Test Plan: ran example in https://github.com/philikon/ReactNativify against a React Native with and without this patch