-
Notifications
You must be signed in to change notification settings - Fork 906
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
feat: support ESM in react-native.config
#2453
Conversation
Re: test plan, test these scenarios:
You don’t need both |
87e5843
to
6f0db32
Compare
566877e
to
0a7e8bf
Compare
c670360
to
7f9a335
Compare
Co-authored-by: Michał Pierzchała <[email protected]>
Co-authored-by: Michał Pierzchała <[email protected]>
Changing the signature of |
Thanks, this would indeed break us. I'm also curious why everything needs be async just because of ESM? IMHO, async makes sense if you're doing a lot of things at once and then awaiting them all. But it looks like we're just async/awaiting in sequence, so I'm not really seeing any benefits. |
Because it's loading ES module dynamically, which needs to be async. |
Nice, thanks to all of the contributors and reviewers here, great to have ESM in I'm not super aware of the upstreaming / integration process here in React Native projects - will this work right away out of the box with Eg:
|
Yes, this should work with v15.1. You'll need to update the template (or your project files) to reference the newer version of the CLI. It doesn't affect Expo projects |
Summary:
Closes #2167
Add support for ESM inside
react-native.config
file.Test Plan:
type: "module"
inside package ✅react-native.config.mjs
with following contentnpx react-native hello
and you should seehello esm
log.Checklist