Skip to content

Commit

Permalink
Add global hook to assert that base Metro config is called (facebook#…
Browse files Browse the repository at this point in the history
…38126)

Summary:
Pull Request resolved: facebook#38126

Towards react-native-community/cli#1987. Will be paired with a CLI PR targeting React Native 0.72.1.

Changelog: None

Reviewed By: motiz88

Differential Revision: D47125080

fbshipit-source-id: b3b9d93ba747240f5168021ccb793ffe5d34251d
  • Loading branch information
huntie authored and facebook-github-bot committed Jun 29, 2023
1 parent 0bd6b28 commit 29f2602
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/metro-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ function getDefaultConfig(
watchFolders: [],
};

// Set global hook so that the CLI can detect when this config has been loaded
global.__REACT_NATIVE_METRO_CONFIG_LOADED = true;

return mergeConfig(
getBaseConfig.getDefaultValues(projectRoot),
config,
Expand Down

0 comments on commit 29f2602

Please sign in to comment.