-
Notifications
You must be signed in to change notification settings - Fork 884
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
Remove explicit React Native entry point #7138
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🦋 Changeset detectedLatest commit: 5fbc371 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Report 1Affected ProductsNo changes between base commit (60ff98d) and merge commit (982d2f4).Test Logs |
Size Analysis Report 1Affected ProductsNo changes between base commit (60ff98d) and merge commit (982d2f4).Test Logs |
prameshj
approved these changes
May 16, 2023
dwyfrequency
approved these changes
Jul 5, 2023
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.
LGTM
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE until 6/20. This is a breaking change and must be released with a major version. It is expected to release with the next major version of the SDK in June 2023.
Remove
firebase/auth/react-native
entry point. The React Native bundle should be automatically picked up by React Native build tools which recognize thereact-native
fields inpackage.json
(at the top level and inexports
). Firestore already does this.The result is that users will not need to remember to use a special path when importing auth in React Native.
Test: I've tested this with an Expo project and it works. One caveat is there's a common pattern where users override Metro's default resolver and spread the old
defaultResolver
, not realizing that this removes thereact-native
field fromresolverMainFields
as Metro's default config is platform agnostic. See facebook/metro#807If users run into this issue we need to remind them that this kind of Metro config modification:
has unexpected results and what they really want to do is:
as their custom metro config will automatically extend existing defaults without the user having to include them explicitly.
The result of doing it the wrong way (the first example) is that Metro will grab the browser bundle instead of the one specified in the package.json
react-native
field. See #7115 for an example of a Firestore user having an issue with this (Firestore is currently the only other product with a specific react native bundle).