trails/apps/mobile/metro.config.js
Ullrich Schäfer 532b22c5c0
Complete Expo SDK 56 upgrade
- Upgrade expo, expo-router, expo-dev-client, expo-crypto, expo-localization,
  expo-location, expo-navigation-bar, expo-notifications, expo-secure-store,
  expo-status-bar, expo-system-ui, expo-web-browser to SDK 56 versions
- Upgrade react-native 0.83.4 → 0.85.3
- Upgrade TypeScript 5.9 → 6.0.3 (required by SDK 56)
- Add react-native-worklets (required peer dep for react-native-reanimated)
- Remove expo-dev-menu as a direct dependency (transitive, managed by Expo)
- Move splash config from top-level ExpoConfig to expo-splash-screen plugin
  (ExpoConfig.splash was removed in SDK 56 types)
- Add expo-localization and expo-splash-screen to plugins array
- Fix metro.config.js watchFolders to merge with Expo defaults instead of
  overwriting them (fixes expo-doctor Metro config check)
- Add types: ["jest"] to tsconfig.json (required for jest globals in TS 6)
- Exclude @sentry/react-native from Expo version validation (bundledNativeModules
  has a stale entry; Sentry 8.x officially supports Expo 51+ and RN 0.73+)

expo-doctor: 18/18 checks passed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 11:52:11 +02:00

18 lines
575 B
JavaScript

const { getDefaultConfig } = require("expo/metro-config");
const path = require("path");
const projectRoot = __dirname;
const monorepoRoot = path.resolve(projectRoot, "../..");
const config = getDefaultConfig(projectRoot);
// Watch all files in the monorepo (merge with Expo defaults)
config.watchFolders = [...(config.watchFolders ?? []), monorepoRoot];
// Resolve modules from both the project and monorepo root
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, "node_modules"),
path.resolve(monorepoRoot, "node_modules"),
];
module.exports = config;