Skip to content

Restore react-native/setup-env references on main#57560

Open
huntie wants to merge 1 commit into
react:mainfrom
huntie:export-D112101450
Open

Restore react-native/setup-env references on main#57560
huntie wants to merge 1 commit into
react:mainfrom
huntie:export-D112101450

Conversation

@huntie

@huntie huntie commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary:
Reverts D112002434.

This fix was needed on 0.87-stable but not on main, since the setup-env-in-bundle-graph fix (#57492) was already present, see file at time of D112002434:

// NOTE: This delegates to the `'react-native/setup-env'` entry point (rather
// than calling `setUpDefaultReactNativeEnvironment` directly) so that
// `src/setup-env.js` is pulled into the module graph. Metro's
// `getModulesRunBeforeMainModule` only runs modules that are already part of
// the bundle, and `InitializeCore` is a guaranteed graph entry (via
// `ReactNativePrivateInitializeCore`). This keeps `'react-native/setup-env'`
// reachable so it runs before the main module.
require('../../src/setup-env');

See #57559 for more info.

Changelog: [Internal]

Differential Revision: D112101450

Summary:
Reverts D112002434.

This fix was needed on `0.87-stable` but not on `main`, since the `setup-env`-in-bundle-graph fix (react#57492) was already present, see file at time of D112002434:

https://github.com/react/react-native/blob/08c323346be6c0fbbd70900d48435f977a78a1bb/packages/react-native/Libraries/Core/InitializeCore.js#L30-L37

See react#57559 for more info.

Changelog: [Internal]

Differential Revision: D112101450
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 15, 2026
@meta-codesync

meta-codesync Bot commented Jul 15, 2026

Copy link
Copy Markdown

@huntie has exported this pull request. If you are a Meta employee, you can view the originating Diff in D112101450.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant