Skip to content

Commit

Permalink
do not require @fb-tools/babel-register in open source
Browse files Browse the repository at this point in the history
Summary:
open source should not require `fb-tools/babel-register`

Changelog: [Internal]

Differential Revision: D63976514
  • Loading branch information
vzaidman authored and facebook-github-bot committed Oct 7, 2024
1 parent cc6d1eb commit bbe4f22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ const {
} = require('@babel/core');
const generate = require('@babel/generator').default;

try {
if (process.env.FBSOURCE_ENV === '1') {
// If we're running in the Meta-internal monorepo, use the central Babel
// registration, which registers all of the relevant source directories
// including Metro's root.
//
// $FlowExpectedError[cannot-resolve-module] - Won't resolve in OSS
require('@fb-tools/babel-register');
} catch {
} else {
// Register Babel to allow local packages to be loaded from source
require('../scripts/build/babel-register').registerForMonorepo();
}
Expand Down

0 comments on commit bbe4f22

Please sign in to comment.