From b52a6bc6a78756d10b5e0f683de5243a31fbfecc Mon Sep 17 00:00:00 2001 From: Rudy Fraser Date: Tue, 10 Nov 2026 17:33:01 -0500 Subject: [PATCH] fix(native): resolve the OAuth client's platform entry under Metro --- metro.config.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/metro.config.ts b/metro.config.ts index 42bb3ed04..54dcd7257 100644 --- a/metro.config.ts +++ b/metro.config.ts @@ -51,6 +51,17 @@ let config = getSentryExpoConfig(import.meta.dirname, { platform, ) } + /* + * @atproto/oauth-client-expo imports its platform-split entry with an + * explicit `.js` extension, which Metro does not map to the `.native.js` + * and `.web.js` files. + */ + if ( + moduleName === './expo-oauth-client.js' && + context.originModulePath.includes('@atproto/oauth-client-expo') + ) { + return context.resolveRequest(context, './expo-oauth-client', platform) + } if ( process.env.BSKY_PROFILE && moduleName.endsWith('ReactNativeRenderer-prod') -- knotmirror 0.0.1