const path = require("path"); const { getDefaultConfig } = require("expo/metro-config"); 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; config.resolver.extraNodeModules = { react: path.resolve(workspaceRoot, "node_modules/react"), "react-dom": path.resolve(workspaceRoot, "node_modules/react-dom"), }; module.exports = config;