diff --git a/examples/demo/metro.config.js b/examples/demo/metro.config.js index 080d7831..a0f7bf42 100644 --- a/examples/demo/metro.config.js +++ b/examples/demo/metro.config.js @@ -6,10 +6,13 @@ const packagePath = path.resolve( path.join(process.cwd(), '..', '..', 'packages', 'react-native-app-auth'), ); +const projectRoot = __dirname; +const monorepoRoot = path.resolve(projectRoot, '../..'); + const extraNodeModules = { 'react-native-app-auth': packagePath, }; -const watchFolders = [packagePath]; +const watchFolders = [monorepoRoot, packagePath]; /** * Metro configuration @@ -30,4 +33,9 @@ const config = { watchFolders, }; +config.resolver.nodeModulesPaths = [ + path.resolve(projectRoot, 'node_modules'), + path.resolve(monorepoRoot, 'node_modules'), +]; + module.exports = mergeConfig(getDefaultConfig(__dirname), config);