bagsy/apps/mobile/metro.config.js
bananabas f69fb1e5cf fix: configure metro and App entry for Expo Go dev server
- Updated App.tsx to use proper Stack navigation
- Created ESM-compatible metro.config.js
- Fixed module resolution for monorepo structure
- Dev server now starts successfully

Ready to test on physical devices via Expo Go app
2026-03-28 07:40:29 +00:00

22 lines
658 B
JavaScript

import { getDefaultConfig } from 'expo/metro-config.js';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const projectRoot = __dirname;
const monorepoRoot = path.resolve(projectRoot, '../..');
const config = getDefaultConfig(projectRoot);
// Extend the resolver to handle monorepo
config.resolver.sourceExts = ['ts', 'tsx', 'js', 'jsx', 'json', 'mjs'];
config.resolver.extraNodeModules = {
'@shop/types': path.resolve(monorepoRoot, 'packages/types'),
};
// Ensure app root is correct
config.projectRoot = projectRoot;
export default config;