Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Leave out .js so Metro can resolve native variant #7675
This PR drops the
The same treatment should probably be performed in all packages, or at least the ones that have native mobile specializations but, let's do that step by step starting with the
How has this been tested?
Types of changes
Bug fix: Modify the
Reverted the previous change and implemented the solution based on the
I opted for a "extension-less" entrypoint for RN to allow Metro use its resolve policy as normal. Let me know if you have other thoughts on this.
I tested the solution against this PR over at the RN app repo.
Technically, you can use
build/index.native.js as we don't have other overrides. It's colocated with the code, so you know upfront what options are there. If you prefer it, we can leave it as is
Do we need to add
react-native fields to other packages that use RN overrides? I'd prefer to include them all in this PR.
True, we can also point to the full filename. I'm not yet 100% which approach is best for the RN case; we should keep an open eye on this. Let's leave it extension-free for now since it feels more Metro-native (but not as much npm-native) and we can revise in the future if new info comes up.
Currently, there is no other package in the
Edit: over DM, @gziolo gave a
Jul 3, 2018
@gziolo , I just found out that the
An idea is to try is to leave
Edit: here's the error occurring in Travis for the RN app: https://travis-ci.org/wordpress-mobile/gutenberg-mobile/jobs/399907186#L523
Another false negative @gziolo
I think we can probably lower the priority of fixing this. We'll still want to remove the highly undocumented