Skip to content

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

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

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.

@meta-codesync meta-codesync Bot closed this in afa2a60 Jul 16, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 16, 2026
@meta-codesync

meta-codesync Bot commented Jul 16, 2026

Copy link
Copy Markdown

This pull request has been merged in afa2a60.

react-native-bot pushed a commit that referenced this pull request Jul 16, 2026
Summary:
Pull Request resolved: #57560

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:

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

See #57559 for more info.

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D112101450

fbshipit-source-id: 435a24e72415e18b5e3d6a5144ed805adc415a95
@huntie
huntie deleted the export-D112101450 branch July 16, 2026 12:39
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. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant