Files
Cibello-app/apps/mobile/metro.config.js
T
2026-08-06 19:54:28 +07:00

19 lines
684 B
JavaScript

// Metro-konfiguration för pnpm-monorepo (Expo-dokumenterat mönster).
const { getDefaultConfig } = require("expo/metro-config");
const path = require("path");
const projectRoot = __dirname;
const workspaceRoot = path.resolve(projectRoot, "../..");
const config = getDefaultConfig(projectRoot);
// Preserve Expo's default watch folders (project root) and add the workspace
// root so that pnpm hoisted workspace packages are resolved (SDK 54 doctor).
config.watchFolders = [...(config.watchFolders ?? []), workspaceRoot];
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, "node_modules"),
path.resolve(workspaceRoot, "node_modules"),
];
module.exports = config;