-
Notifications
You must be signed in to change notification settings - Fork 626
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
Is the .mjs
file extension resolved by metro bundler?
#59
Comments
...assuming they have been transpiled properly that is, like webpack does. Example setup: https://github.com/mobxjs/mobx/pull/1131/files Should solve facebook#59 Beyond that I have no clue what I am doing, so this is just a proposal 😁
Had some collegues testing it, using |
Update: seems that |
What are future plans on this? I have to admit it is quite unobvious as library author how a library should be published to make it suitable for RN, without falling back to UMD / commonjs |
Closing for now, until .mjs has become a bit more mainstream. Still curious on thoughts around this though |
Hey @mweststrate! Thanks for bringing this up. As you mention, For now I think it's better to wait until In the meantime, RN users can customize the If there is a lot of demand of users wanting to use files with the |
Please send a pull request to the resolution code in "ResolutionRequest", with tests, and we are happy to merge and support this functionality :) |
Tnx! Closed for now, after diving into webpack a bit further, it is not even supported officially there, so probably it is better to wait until webpack has figured it out :). For now just added a |
Hi all, quick question as library maintainer, is the
.mjs
file extension supported by metro? In order words, will a package json with amodule
field like this work like with webpack (or ismodule
ignored completely, which would be fine as well):"module": "lib/mobx.mjs"
The text was updated successfully, but these errors were encountered: