From f60938ede0dfb43699f69e6ecb2007ef750ff262 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Wed, 19 Apr 2023 13:34:57 +0100 Subject: [PATCH] [0.72] Drop internal base config merge in metro-config Cherry pick https://github.com/facebook/react-native/pull/36777 --- packages/metro-config/index.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/metro-config/index.js b/packages/metro-config/index.js index ec7d935e041d76..ca3efe4f8f641b 100644 --- a/packages/metro-config/index.js +++ b/packages/metro-config/index.js @@ -8,9 +8,9 @@ * @noformat */ -/*:: import type {ConfigT} from 'metro-config'; */ +/*:: import type {MetroConfig} from 'metro-config'; */ -const {getDefaultConfig: getBaseConfig, mergeConfig} = require('metro-config'); +const {mergeConfig} = require('metro-config'); const INTERNAL_CALLSITES_REGEX = new RegExp( [ @@ -37,8 +37,8 @@ const INTERNAL_CALLSITES_REGEX = new RegExp( */ function getDefaultConfig( projectRoot /*: string */ -) /*: ConfigT */ { - const config = { +) /*: MetroConfig */ { + return { resolver: { resolverMainFields: ['react-native', 'browser', 'main'], platforms: ['android', 'ios'], @@ -76,11 +76,6 @@ function getDefaultConfig( }, watchFolders: [], }; - - return mergeConfig( - getBaseConfig.getDefaultValues(projectRoot), - config, - ); } module.exports = {getDefaultConfig, mergeConfig};