Skip to content

Commit

Permalink
fix metro for example app for iOS (#1005)
Browse files Browse the repository at this point in the history
  • Loading branch information
zibs authored Jul 24, 2024
1 parent 31f903f commit 8d2f1e7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples/demo/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);

0 comments on commit 8d2f1e7

Please sign in to comment.