Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/react-native/Libraries/Core/InitializeCore.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@

'use strict';

require('../../src/private/setup/setUpDefaultReactNativeEnvironment').default();
// 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');
Loading