Add global hook to assert that base Metro config is called (#38126)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38126

Towards https://github.com/react-native-community/cli/issues/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
This commit is contained in:
Alex Hunt 2023-06-29 08:51:14 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 0bd6b28b32
Коммит 29f2602ff9
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -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,