Skip to content

Commit 8d2f1e7

Browse files
authored
fix metro for example app for iOS (#1005)
1 parent 31f903f commit 8d2f1e7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

examples/demo/metro.config.js

+9-1
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)