Skip to content

Commit 29f2602

Browse files
huntiefacebook-github-bot
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 0bd6b28 commit 29f2602

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
@@ -77,6 +77,9 @@ function getDefaultConfig(
7777
watchFolders: [],
7878
};
7979

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

0 commit comments

Comments
 (0)