diff --git a/samples/react-native-macos/metro.config.js b/samples/react-native-macos/metro.config.js index f34d60cc69..363086b13c 100644 --- a/samples/react-native-macos/metro.config.js +++ b/samples/react-native-macos/metro.config.js @@ -25,7 +25,7 @@ const config = { // Note how we change this from `monorepoRoot` to `projectRoot`. This is part of the optimization! watchFolders: [projectRoot, ...Object.values(monorepoPackages)], resolver: { - resolverMainFields: ['main', 'react-native'], + resolverMainFields: ['react-native', 'main'], resolveRequest: (context, moduleName, platform) => { if (moduleName.includes('promise/')) { return context.resolveRequest( diff --git a/samples/react-native/metro.config.js b/samples/react-native/metro.config.js index 2444d12dcc..7ecc754c00 100644 --- a/samples/react-native/metro.config.js +++ b/samples/react-native/metro.config.js @@ -25,7 +25,7 @@ const config = { // Note how we change this from `monorepoRoot` to `projectRoot`. This is part of the optimization! watchFolders: [projectRoot, ...Object.values(monorepoPackages)], resolver: { - resolverMainFields: ['main', 'react-native'], + resolverMainFields: ['react-native', 'main'], resolveRequest: (context, moduleName, platform) => { if (moduleName.includes('promise/')) { return context.resolveRequest(