import path from 'node:path'; import { fileURLToPath } from 'node:url'; import { getDefaultConfig } from 'expo/metro-config.js'; const projectRoot = path.dirname(fileURLToPath(import.meta.url)); const workspaceRoot = path.resolve(projectRoot, '../..'); const config = getDefaultConfig(projectRoot); config.resolver.disableHierarchicalLookup = true; config.resolver.nodeModulesPaths = [ path.resolve(projectRoot, 'node_modules'), path.resolve(workspaceRoot, 'node_modules'), ]; config.resolver.extraNodeModules = { react: path.resolve(projectRoot, 'node_modules/react'), 'react-test-renderer': path.resolve(projectRoot, 'node_modules/react-test-renderer'), 'react-native-safe-area-context': path.resolve(projectRoot, 'node_modules/react-native-safe-area-context'), 'react-native-screens': path.resolve(projectRoot, 'node_modules/react-native-screens'), '@react-native-async-storage/async-storage': path.resolve( projectRoot, 'node_modules/@react-native-async-storage/async-storage', ), 'expo-application': path.resolve(projectRoot, 'node_modules/expo-notifications/node_modules/expo-application'), }; export default config;