Remove explicit React Native entry point #7138
Merged
+7
−51
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).