Skip to content

Commit e250676

Browse files
huntiekelset
authored andcommitted
Add global hook to assert that base Metro config is called (#38126)
Summary: Pull Request resolved: #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
1 parent 03b9b52 commit e250676

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/metro-config/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ function getDefaultConfig(
7878
watchFolders: [],
7979
};
8080

81+
// Set global hook so that the CLI can detect when this config has been loaded
82+
global.__REACT_NATIVE_METRO_CONFIG_LOADED = true;
83+
8184
return mergeConfig(
8285
getBaseConfig.getDefaultValues(projectRoot),
8386
config,

0 commit comments

Comments
 (0)