-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathmetro.config.js
More file actions
32 lines (25 loc) · 906 Bytes
/
metro.config.js
File metadata and controls
32 lines (25 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const { getDefaultConfig } = require('expo/metro-config');
const path = require('path');
// Find the project and workspace directories
const projectRoot = __dirname;
// This can be replaced with `find-yarn-workspace-root`
const monorepoRoot = path.resolve(projectRoot, '../');
const config = getDefaultConfig(projectRoot);
// 1. Watch all files within the monorepo
config.watchFolders = [monorepoRoot];
// 2. Let Metro know where to resolve packages and in what order
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, 'node_modules'),
path.resolve(monorepoRoot, 'node_modules'),
];
config.resolver.assetExts.push('riv');
module.exports = config;
// const path = require('path');
// module.exports = {
// resolver: {
// extraNodeModules: {
// 'rive-react-native': path.resolve(__dirname, '..'),
// },
// },
// watchFolders: [path.resolve(__dirname, '..')],
// };