Skip to content

Commit 054d6e6

Browse files
committed
breaking: Remove fallback flow for Metro config defaults (0.73)
Reverts #1896
1 parent 7bac38a commit 054d6e6

2 files changed

Lines changed: 3 additions & 100 deletions

File tree

packages/cli-plugin-metro/src/tools/getDefaultMetroConfig.ts

Lines changed: 0 additions & 87 deletions
This file was deleted.

packages/cli-plugin-metro/src/tools/loadMetroConfig.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
} from 'metro-config';
1010
import {CLIError, logger} from '@react-native-community/cli-tools';
1111
import type {Config} from '@react-native-community/cli-types';
12-
import getDefaultMetroConfig from './getDefaultMetroConfig';
1312
import {reactNativePlatformResolver} from './metroPlatformResolver';
1413

1514
export type {Config};
@@ -101,20 +100,11 @@ export default async function loadMetroConfig(
101100
)
102101
) {
103102
logger.warn(
104-
'From React Native 0.72, your metro.config.js file should extend' +
105-
"'@react-native/metro-config'. Please see the React Native 0.72 " +
106-
'changelog, or copy the template at:\n' +
103+
'From React Native 0.73, your metro.config.js file should extend' +
104+
"'@react-native/metro-config' or it will fail to build. Please copy " +
105+
'the template at:\n' +
107106
'https://github.com/facebook/react-native/blob/main/packages/react-native/template/metro.config.js',
108107
);
109-
logger.warn('Falling back to internal defaults.');
110-
111-
const loadedConfig = await loadConfig(
112-
{cwd: ctx.root, ...options},
113-
// Provide React Native defaults on top of Metro defaults
114-
getDefaultMetroConfig(ctx),
115-
);
116-
117-
return mergeConfig(loadedConfig, overrideConfig);
118108
}
119109

120110
return mergeConfig(

0 commit comments

Comments
 (0)