From ac96efae6153c3e7e8a54e0815cc161c8292812b Mon Sep 17 00:00:00 2001 From: Rick nagual Date: Wed, 5 Apr 2023 15:37:41 +0800 Subject: [PATCH] fix(expo): add `aliasFields` to handle replaced files in browser env closed #16105 --- packages/expo/plugins/metro-resolver.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/expo/plugins/metro-resolver.ts b/packages/expo/plugins/metro-resolver.ts index 4b1fab107d06c..74153d2404f29 100644 --- a/packages/expo/plugins/metro-resolver.ts +++ b/packages/expo/plugins/metro-resolver.ts @@ -205,6 +205,7 @@ function getPnpmResolver(extensions: string[]) { modules: [join(workspaceRoot, 'node_modules'), 'node_modules'], conditionNames: ['native', 'browser', 'require', 'default'], mainFields: ['react-native', 'browser', 'main'], + aliasFields: ['browser'], }); } return resolver;