diff --git a/packages/community-cli-plugin/src/utils/loadMetroConfig.js b/packages/community-cli-plugin/src/utils/loadMetroConfig.js index 9b6a79ee1041..3a9f7df94f6c 100644 --- a/packages/community-cli-plugin/src/utils/loadMetroConfig.js +++ b/packages/community-cli-plugin/src/utils/loadMetroConfig.js @@ -96,8 +96,6 @@ export default async function loadMetroConfig( // Get the RN defaults before our customisations const defaultConfig = RNMetroConfig.getDefaultConfig(ctx.root); - // Unflag the config as being loaded - it must be loaded again in userland. - global.__REACT_NATIVE_METRO_CONFIG_LOADED = false; // Add our defaults to `@react-native/metro-config` before the user config // loads them. @@ -119,20 +117,6 @@ export default async function loadMetroConfig( debug(`Reading Metro config from ${projectConfig.filepath}`); - if (!global.__REACT_NATIVE_METRO_CONFIG_LOADED) { - const warning = ` -================================================================================================= -From React Native 0.73, your project's Metro config should extend '@react-native/metro-config' -or it will fail to build. Please copy the template at: -https://github.com/react-native-community/template/blob/main/template/metro.config.js -This warning will be removed in future (https://github.com/facebook/metro/issues/1018). -================================================================================================= - `; - - for (const line of warning.trim().split('\n')) { - console.warn(line); - } - } return loadConfig({ cwd, ...options, diff --git a/packages/metro-config/src/index.flow.js b/packages/metro-config/src/index.flow.js index 2f4e44c187bc..5fb4be2cd3fe 100644 --- a/packages/metro-config/src/index.flow.js +++ b/packages/metro-config/src/index.flow.js @@ -99,9 +99,6 @@ export function getDefaultConfig(projectRoot: string): ConfigT { watchFolders: [], }; - // Set global hook so that the CLI can detect when this config has been loaded - global.__REACT_NATIVE_METRO_CONFIG_LOADED = true; - const metroDefaults = getBaseConfig.getDefaultValues(projectRoot); return mergeConfig(metroDefaults, reactNativeDefaults, frameworkDefaults);