This commit is contained in:
2026-04-18 23:11:35 +02:00
commit f7cfd2a86e
196 changed files with 35538 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
// Metro config for Expo inside a pnpm monorepo.
// Key points:
// - Watch the repo root so workspace packages (@chat-app/shared, db-types) are seen.
// - Disable hierarchical lookup so Metro uses only the hoisted/workspace node_modules.
// - Add nodeModulesPaths so symlinked workspace deps resolve.
const { getDefaultConfig } = require('expo/metro-config');
const path = require('path');
const projectRoot = __dirname;
const workspaceRoot = path.resolve(projectRoot, '../..');
const config = getDefaultConfig(projectRoot);
config.watchFolders = [workspaceRoot];
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, 'node_modules'),
path.resolve(workspaceRoot, 'node_modules'),
];
config.resolver.disableHierarchicalLookup = true;
module.exports = config;