Skip to content

Commit

Permalink
import correct babel register (facebook#46987)
Browse files Browse the repository at this point in the history
Summary:

X-link: facebook/metro#1371

Update `babel/register` to latest version, fixing the bug that were preventing us from updating it previously.

Differential Revision: D64245277
  • Loading branch information
vzaidman authored and facebook-github-bot committed Oct 11, 2024
1 parent c86b5c1 commit 2699a5a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/build/babel-register.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2699a5a

Please sign in to comment.