Skip to content

Commit 6370cc5

Browse files
committed
1 parent fe3646e commit 6370cc5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

examples/demo/metro.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ const packagePath = path.resolve(
66
path.join(process.cwd(), '..', '..', 'packages', 'react-native-app-auth'),
77
);
88

9+
const projectRoot = __dirname;
10+
const monorepoRoot = path.resolve(projectRoot, '../..');
11+
912
const extraNodeModules = {
1013
'react-native-app-auth': packagePath,
1114
};
12-
const watchFolders = [packagePath];
15+
const watchFolders = [monorepoRoot, packagePath];
1316

1417
/**
1518
* Metro configuration
@@ -30,4 +33,9 @@ const config = {
3033
watchFolders,
3134
};
3235

36+
config.resolver.nodeModulesPaths = [
37+
path.resolve(projectRoot, 'node_modules'),
38+
path.resolve(monorepoRoot, 'node_modules'),
39+
];
40+
3341
module.exports = mergeConfig(getDefaultConfig(__dirname), config);

0 commit comments

Comments
 (0)