Messenger/packages/mobile/metro.config.js
Заид Омар Медхат | Zaid Omar Medhat f653b083aa f
2026-07-13 12:32:00 +05:00

21 lines
871 B
JavaScript

// 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;