Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use metro-babel-register for additive Babel registration (facebook#45295
) Summary: Pull Request resolved: facebook#45295 When registering Babel to run RN from source, we currently call `babel/register` directly from `scripts/babel-register.js`. This has the effect of overwriting any previous registration, which causes problems in the FB monorepo because RN also loads other projects that lie outside this registration (like Metro) from source - possibly requiring different configurations. Moreover, if Metro is subsequently loaded from source, its own registration clobbers RN's. Instead, this diff runs the registration through `metro-babel-register`, which maintains a cumulative list of registration directories and applies a uniform transform. Note that this means we're not using exactly the same transform at build/publish time as for running from source - to fix that, we ought to move everything to a central `babel.config.js`, but that's a much bigger change, and this gets us close enough to unblock. Changelog: [Internal] Differential Revision: D59376984
- Loading branch information