File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,8 +96,6 @@ export default async function loadMetroConfig(
9696
9797 // Get the RN defaults before our customisations
9898 const defaultConfig = RNMetroConfig . getDefaultConfig ( ctx . root ) ;
99- // Unflag the config as being loaded - it must be loaded again in userland.
100- global . __REACT_NATIVE_METRO_CONFIG_LOADED = false ;
10199
102100 // Add our defaults to `@react-native/metro-config` before the user config
103101 // loads them.
@@ -119,20 +117,6 @@ export default async function loadMetroConfig(
119117
120118 debug ( `Reading Metro config from ${ projectConfig . filepath } ` ) ;
121119
122- if ( ! global . __REACT_NATIVE_METRO_CONFIG_LOADED ) {
123- const warning = `
124- =================================================================================================
125- From React Native 0.73, your project's Metro config should extend '@react-native/metro-config'
126- or it will fail to build. Please copy the template at:
127- https://github.com/react-native-community/template/blob/main/template/metro.config.js
128- This warning will be removed in future (https://github.com/facebook/metro/issues/1018).
129- =================================================================================================
130- ` ;
131-
132- for ( const line of warning . trim ( ) . split ( '\n' ) ) {
133- console . warn ( line ) ;
134- }
135- }
136120 return loadConfig ( {
137121 cwd,
138122 ...options ,
Original file line number Diff line number Diff line change @@ -99,9 +99,6 @@ export function getDefaultConfig(projectRoot: string): ConfigT {
9999 watchFolders : [ ] ,
100100 } ;
101101
102- // Set global hook so that the CLI can detect when this config has been loaded
103- global . __REACT_NATIVE_METRO_CONFIG_LOADED = true ;
104-
105102 const metroDefaults = getBaseConfig . getDefaultValues ( projectRoot ) ;
106103
107104 return mergeConfig ( metroDefaults , reactNativeDefaults , frameworkDefaults ) ;
You can’t perform that action at this time.
0 commit comments