From 4e7898c01d5ad8dd85823fbbdee3f22081685eec Mon Sep 17 00:00:00 2001 From: Rosie-Kennelly-1 Date: Mon, 9 Mar 2026 17:40:32 +0000 Subject: [PATCH 1/2] fix: configure Metro for monorepo local development in expo-example Without watchFolders, nodeModulesPaths, and blockList, Metro cannot resolve the symlinked @intercom/intercom-react-native package when developing locally from examples/expo-example. This caused a cascade of errors: unresolved modules, duplicate React Native copies, and SyntaxError from stale dependencies in the library root's node_modules. Co-Authored-By: Claude Opus 4.6 --- examples/expo-example/metro.config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/expo-example/metro.config.js b/examples/expo-example/metro.config.js index 520f29c0..67d6dac7 100644 --- a/examples/expo-example/metro.config.js +++ b/examples/expo-example/metro.config.js @@ -1,7 +1,17 @@ +const path = require('path'); const { getDefaultConfig } = require('expo/metro-config'); const { withNativeWind } = require('nativewind/metro'); +const libraryRoot = path.resolve(__dirname, '..', '..'); + const config = getDefaultConfig(__dirname); config.resolver.unstable_enableSymlinks = true; +config.watchFolders = [libraryRoot]; +config.resolver.nodeModulesPaths = [ + path.resolve(__dirname, 'node_modules'), +]; +config.resolver.blockList = [ + new RegExp(path.resolve(libraryRoot, 'node_modules') + '/.*'), +]; module.exports = withNativeWind(config, { input: './global.css' }); From 365c30ead1d68ed4c572cf0ee08b1621d6a35a60 Mon Sep 17 00:00:00 2001 From: Rosie-Kennelly-1 Date: Mon, 9 Mar 2026 17:47:50 +0000 Subject: [PATCH 2/2] style: fix Prettier formatting in metro config Co-Authored-By: Claude Opus 4.6 --- examples/expo-example/metro.config.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/expo-example/metro.config.js b/examples/expo-example/metro.config.js index 67d6dac7..c67deeff 100644 --- a/examples/expo-example/metro.config.js +++ b/examples/expo-example/metro.config.js @@ -7,9 +7,7 @@ const libraryRoot = path.resolve(__dirname, '..', '..'); const config = getDefaultConfig(__dirname); config.resolver.unstable_enableSymlinks = true; config.watchFolders = [libraryRoot]; -config.resolver.nodeModulesPaths = [ - path.resolve(__dirname, 'node_modules'), -]; +config.resolver.nodeModulesPaths = [path.resolve(__dirname, 'node_modules')]; config.resolver.blockList = [ new RegExp(path.resolve(libraryRoot, 'node_modules') + '/.*'), ];