Skip to content

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