forked from facebook/metro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "exports" special case handling for @babel/runtime (facebook#990)
Summary: Pull Request resolved: facebook#990 This is a workaround for facebook#984. It adds a specific exception in the resolver for `babel/runtime` to prevent asserting the `"import"` condition name on these modules (when using Package Exports). This is necessary so that the CJS version of these Babel helpers are resolved, which enable CJS/MJS interop for all other modules (given our current strategy of resolving both `"require"` and `"import"` in all other packages and using Babel-driven ESM compatibility). This workaround is removable if/when any of: - babel/babel#15643 is merged and updated in React Native. - We implement dynamic handling of `"require"` and `"import"` conditions via ESM support in a future version of Metro. Changelog: **[Experimental]** Fix `babel/runtime` issue when using Package Exports Reviewed By: motiz88 Differential Revision: D46107056 fbshipit-source-id: 5c34c5b3e1aaec16b998499401c81fadee34c30d
- Loading branch information
1 parent
40f9f06
commit 1e424f2
Showing
2 changed files
with
64 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters