- 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
22 lines
658 B
JavaScript
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;
|