mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 22:10:14 +00:00
fix how @babel/register is used and update it (#46987)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46987 X-link: https://github.com/facebook/metro/pull/1371 Update `babel/register` to latest version, fixing the bug that were preventing us from updating it previously. Changelog: [Internal] Reviewed By: huntie Differential Revision: D64245277 fbshipit-source-id: f3d07b06a11fbe3a0ed28e22f5b687541782dda9
This commit is contained in:
parent
4dd47eeb9e
commit
e08c7eb22a
@ -30,7 +30,12 @@ function registerForMonorepo() {
|
||||
return;
|
||||
}
|
||||
|
||||
require('metro-babel-register')([PACKAGES_DIR]);
|
||||
if (process.env.FBSOURCE_ENV === '1') {
|
||||
// $FlowExpectedError[cannot-resolve-module] - Won't resolve in OSS
|
||||
require('@fb-tools/babel-register');
|
||||
} else {
|
||||
require('metro-babel-register')([PACKAGES_DIR]);
|
||||
}
|
||||
|
||||
isRegisteredForMonorepo = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user