Skip to content

Commit b1c1171

Browse files
authored
Fix project files
1 parent 3873a18 commit b1c1171

File tree

10 files changed

+65370
-90
lines changed

10 files changed

+65370
-90
lines changed

example/metro.config.js

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
1-
// Learn more https://docs.expo.io/guides/customizing-metro
2-
const { getDefaultConfig } = require('expo/metro-config');
1+
const path = require('path');
2+
const exclusionList = require('metro-config/src/defaults/exclusionList');
3+
const { getDefaultConfig } = require('@expo/metro-config');
34

4-
/** @type {import('expo/metro-config').MetroConfig} */
5-
const config = getDefaultConfig(__dirname);
5+
const projectRoot = __dirname;
6+
const workspaceRoot = path.resolve(projectRoot, '..');
67

7-
const packagePath = "../";
8+
const config = getDefaultConfig(projectRoot);
89

9-
config.resolver.nodeModulesPaths.push(packagePath);
10+
config.watchFolders = [workspaceRoot];
1011

11-
config.watchFolders.push(packagePath);
12+
config.resolver.nodeModulesPaths = [
13+
path.resolve(projectRoot, 'node_modules'),
14+
path.resolve(workspaceRoot, 'node_modules'),
15+
];
16+
17+
config.resolver.extraNodeModules = {
18+
'cloudinary-react-native': path.resolve(workspaceRoot),
19+
};
20+
21+
// 🚫 Exclude nested react-native versions
22+
config.resolver.blockList = exclusionList([
23+
new RegExp(`${workspaceRoot}/node_modules/react-native/.*`),
24+
]);
1225

1326
module.exports = config;

0 commit comments

Comments
 (0)