Skip to content
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

handle react-native resolver #8478

Merged
merged 1 commit into from
Dec 27, 2024
Merged

handle react-native resolver #8478

merged 1 commit into from
Dec 27, 2024

Conversation

hosseinmd
Copy link
Contributor

Specially in react-native repack, we need to resolve from source code

@TkDodo
Copy link
Collaborator

TkDodo commented Dec 27, 2024

I have never seen a top-level react-native field in package.json, and a quick google search also didn't yield any good results. Can you please elaborate what this does, which bundlers interpret this field and why we need it? Thanks.

@hosseinmd
Copy link
Contributor Author

hosseinmd commented Dec 27, 2024

Look at these libraries:
React-navigation
React-freeze
react-native-video
react-native-gesture-handler
cross-fetch
lottie-react-native

And so many libraries which wanna work with platform specific files ('.native.ts' or '.android.ts') should be considered this.
Without specifying source for react-native loaders for handling tree shaking will load module and then import react-dom in react-native

@hosseinmd
Copy link
Contributor Author

@TkDodo TkDodo merged commit 7ade233 into TanStack:main Dec 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants