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

Add react native entry point in package.json #90

Merged
merged 1 commit into from
May 14, 2021

Conversation

bastienrobert
Copy link

No description provided.

@marcofugaro
Copy link
Member

Thanks! Could you leave a little explaination of why is this needed? I am guessing it's for metro.. right?

@bastienrobert
Copy link
Author

Yup! Metro is getting the .cjs by default because it's the main entry point. It doesn't work with RN but the ESM build is working fine. The main error I got with the CommonJS build was because of line 13012:

const performance = require('perf_hooks').performance || {};

@marcofugaro
Copy link
Member

Makes sense, thanks for the PR!

Shame that metro doesn't support the module field.

@marcofugaro marcofugaro merged commit f46224f into pmndrs:master May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants