Skip to content

Commit

Permalink
conditional Babel registration no longer necessary (facebook#44362)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#44362

Packages that are built and directly run in the monorepo no longer need to worry about
conditionally registering themselves to transpile Flow -> JS at runtime. Our build step
strips this file now.

Changelog: [Internal] changes in published packages no longer require conditional calls to Babel register.

Reviewed By: huntie

Differential Revision: D56839521

fbshipit-source-id: 6bec706c639f1ab4138e0b790be8a07654333046
  • Loading branch information
blakef authored and facebook-github-bot committed May 7, 2024
1 parent 2d46dbe commit 47848ad
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 16 deletions.
4 changes: 1 addition & 3 deletions packages/community-cli-plugin/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
export type * from './index.flow';
*/

if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
require('../../../scripts/build/babel-register').registerForMonorepo();
}
require('../../../scripts/build/babel-register').registerForMonorepo();

module.exports = require('./index.flow');
4 changes: 1 addition & 3 deletions packages/core-cli-utils/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
export type * from './index.flow';
*/

if (process.env.BUILD_EXCLUDE_BABEL_REGISTER == null) {
require('../../../scripts/build/babel-register').registerForMonorepo();
}
require('../../../scripts/build/babel-register').registerForMonorepo();

module.exports = require('./index.flow');
4 changes: 1 addition & 3 deletions packages/core-cli-utils/src/public/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
export type * from './version.flow';
*/

if (process.env.BUILD_EXCLUDE_BABEL_REGISTER == null) {
require('../../../../scripts/build/babel-register').registerForMonorepo();
}
require('../../../../scripts/build/babel-register').registerForMonorepo();

module.exports = require('./version.flow');
6 changes: 2 additions & 4 deletions packages/dev-middleware/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
export type * from './index.flow';
*/

if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
require('../../../scripts/build/babel-register').registerForMonorepo();
}
require('../../../scripts/build/babel-register').registerForMonorepo();

export * from './index.flow';
module.exports = require('./index.flow');
4 changes: 1 addition & 3 deletions packages/metro-config/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
export type * from './index.flow';
*/

if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
require('../../../scripts/build/babel-register').registerForMonorepo();
}
require('../../../scripts/build/babel-register').registerForMonorepo();

module.exports = require('./index.flow');

0 comments on commit 47848ad

Please sign in to comment.