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

Support ES Module / Typescript config #916

Open
acalvino4 opened this issue Jan 18, 2023 · 2 comments
Open

Support ES Module / Typescript config #916

acalvino4 opened this issue Jan 18, 2023 · 2 comments
Assignees

Comments

@acalvino4
Copy link

acalvino4 commented Jan 18, 2023

Feature request: support typescript / esm config

What is the current behavior?

Metro does not look for a metro.config.ts, and if it did, I have no idea whether it would be configurable as a module.

This seems necessary sooner or later, as the ecosystem is moving to modules, and majority of people are using typescript (RN just made it the default for new projects).

What is the desired behavior?

Metro uses metro.config.ts if it exists, and the docs include an example of what this looks like.

@huntie huntie self-assigned this Mar 13, 2023
huntie added a commit to huntie/metro that referenced this issue Jul 7, 2023
Summary:
Resolves facebook#1026, resolves facebook#916.

Changelog: **[Feature]** Widen config search paths to include `metro.config.cjs`

Differential Revision: D47290079

fbshipit-source-id: d50c61f08580a04ad2de57092a0c77c5c5b0f22a
@karlhorky
Copy link

karlhorky commented Mar 27, 2024

Update on ESM configs:

In the other issue @robhogan mentioned that ESM configs will need to wait until Node.js v20 is used for the react-native projects:

@stefan-schweiger
Copy link

Now that we have ESM support for react-native.config files how about metro.config?

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

No branches or pull requests

4 participants