-
Notifications
You must be signed in to change notification settings - Fork 16
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
File extension pattern matching in React Native 0.62.4 for mjs cjs main and module files #46
Comments
This is a known issue with metro: facebook/metro#535 It's going to be more of an issue going forward as maintainers upgrade their JavaScript projects to ESM. The meaning of the So whichever a maintainer picks, we need those |
Also I browsed the commits linked to that metro issue, it looks like you might be adjust the metro config as a workaround: |
Amazing explanation and thank you for the action item. The facebook metro team should really permanently fix this from their side so people can upgrade long term. I confirm it is now working as expected this link you posted, and it works beautifully. Have a great day! Love the package, and keep up the amazing work! |
Thank you! I'm happy you are finding it useful! |
@bhousel Thank you very much for the help. Just one small thing left before package is fully ready for RN again.
Yes browser export was causing issues, and I get the actual root issue now aside from browser export.
It's the file extension pattern matching.
This is v4.1.0 package.json, it conforms to pattern
it conforms to this pattern that React-Native wants, notice the .js extension
(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.svg|.native.svg|.svg)
, without this Xcode will not build.However in v5.0.3, it becomes
If I just added a .js to both of these files (RN uses module but both pattern matching was needed)
This works perfectly. All features are now back online. It's silly, but the pattern matching is strict.
The text was updated successfully, but these errors were encountered: