diff --git a/apps/mobile/metro.config.js b/apps/mobile/metro.config.js index f4f52ea..cd3c3fa 100644 --- a/apps/mobile/metro.config.js +++ b/apps/mobile/metro.config.js @@ -18,5 +18,10 @@ config.resolver.nodeModulesPaths = [ path.resolve(workspaceRoot, 'node_modules'), ]; config.resolver.disableHierarchicalLookup = true; +// Make Metro honor the "exports" field in package.json. @chat-app/shared +// maps subpaths like "./supabase" -> "./src/supabase/index.ts" via exports; +// without this flag the eager bundler (preview/production) ignores them +// and falls back to legacy main-only resolution, which 404s on subpaths. +config.resolver.unstable_enablePackageExports = true; module.exports = config;