-
Notifications
You must be signed in to change notification settings - Fork 127
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
RFC: Metro package exports support #534
RFC: Metro package exports support #534
Conversation
Near-term planned changesFrom initial internal and external feedback round. These are being strongly considered to form updated versions of this proposal. cc @motiz88 @robhogan @EvanBacon @kelset (+ others) 1. Move strict handling out of current proposalThe surface area of this proposal is large and we want to be sure that package maintainers understand changes correctly and are not burdened by too many framework decisions at once (e.g. the new architecture migration is concurrently being pushed to the community). Most of the benefits of Proposed: Split out all strict mode references into a future RFC (for a future effort). 2. Widen definition and behaviour of
|
Re asserting both |
hey @huntie just wanted to check in - what's the status of the work and/or of this PR? any blockers we can help with? |
@kelset No blockers as of the "Near-term planned changes" note above. I haven't started implementation yet due to internal project scheduling (have been working on another thing for the last couple of months), but I wanted to get questions answered for I'm aiming to push the updated RFC doc (incorporating planned changes) to this branch next week, then seeking to merge this PR. Will ping you and others for an approval at that time. |
FWIW, facebook/react-native#35203 has landed, so the Jest env used in the preset uses it (or, will when published) |
Actions planned changes from react-native-community#534 (comment)
Changes in 1a25973(Planned changes above were integrated in e510faa.) Following this, I've pushed another revision addressing further feedback, and have ended up inverting our plans around backwards compatibility for exact path specifiers and platform-specific extensions — we would prefer to make handling of these cases breaking in order to follow the Significant changes:
More detail on:
As of these changes, I'm looking to have the proposal accepted and merged. |
c897cba
to
15e943a
Compare
What about subpath imports? Is there a separate RFC for this? |
@matthew-dean Briefly noted on L78: We aren't committing to implementing subpath imports right now, but it might be something we can follow up with quickly next year. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is stellar work! Thanks @huntie for shepherding it through all the design discussions. LGTM, with one thing I'd love to see clarified re: path conflicts.
…g detail Significant changes: - Now breaking: `"exports"` subpath is preferred in a path conflict. - Now breaking: `"exports"` subpath is used if matched, blocking platform-specific extensions resolution. More detail on: - Dynamic configuration of asserted condition names - Anticipated breaking change risk levels - Nested conditions support is now P0
15e943a
to
2d2ea59
Compare
Actions planned changes from #534 (comment)
This adds a new RFC containing the intended design and rollout strategy for package exports support within Metro, which will affect how React Native apps consume npm packages and how package authors expose modules to React Native apps.
Recommended (in the Files changed tab): "Display the rich diff"