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

chore: add react native compat #188

Closed
wants to merge 1 commit into from

Conversation

shamilovtim
Copy link

No description provided.

@sindresorhus
Copy link
Owner

No thanks :)

@shamilovtim
Copy link
Author

Hey @sindresorhus trying to understand the harm of this one liner. We already use a custom resolver to resolve your project transitively. This is simply codifying what already works and presents no additional effort or maintenance burden. We also support the "main" package.json entry-point, it doesn't have to be "react-native." but the project lacks "main".

@shamilovtim
Copy link
Author

For instance in #58 a PR was accepted that modifies actual runtime logic in order to support additional runtimes. Why is a simple package.json entry-point worth declining a PR over, while #58 is accepted?

@sindresorhus
Copy link
Owner

The actual problem here is React Native not supporting the exports field, which is the standard field for exports in package.json. I'm simply not interested in adding workarounds for non-compliant tools, no matter how simple the workaround is. It's a slippery slope. In addition, adding back main, allows incorrect usage of the package, like accessing internal files, and accessing internal types in TypeScript.


For instance in #58 a PR was accepted that modifies actual runtime logic in order to support additional runtimes. Why is a simple package.json entry-point worth declining a PR over, while #58 is accepted?

It was added to support browsers, which are the majority of consumers of this package.


I'm going to lock this as there are no arguments that will convince me to add back main or add react-native. Sorry.

Repository owner locked as resolved and limited conversation to collaborators May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants