// Metro tuned for the pnpm monorepo: watch the workspace root so changes in // @altricade/core (consumed as TS source via package exports) are picked up, // and resolve modules from both the app and the root node_modules. 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'), ]; // @altricade/core's package.json exports point at ./src/*.ts — honor them. config.resolver.unstable_enablePackageExports = true; config.resolver.unstable_conditionNames = ['react-native', 'require', 'import', 'default']; module.exports = config;