-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetro.config.js
More file actions
26 lines (23 loc) · 881 Bytes
/
metro.config.js
File metadata and controls
26 lines (23 loc) · 881 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
const path = require('path');
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const projectRoot = __dirname;
const sdkRoot = path.resolve(projectRoot, '../react-native-bootpay-api');
const config = {
watchFolders: [sdkRoot],
resolver: {
unstable_enableSymlinks: true,
nodeModulesPaths: [path.resolve(projectRoot, 'node_modules')],
extraNodeModules: new Proxy(
{},
{
get: (_, name) => path.resolve(projectRoot, 'node_modules', name),
},
),
blockList: [
new RegExp(
`${sdkRoot.replace(/[/\\]/g, '[/\\\\]')}[/\\\\]node_modules[/\\\\](react|react-native|react-native-webview-bootpay|react-native-gesture-handler|react-native-screens|react-native-safe-area-context|@react-navigation)[/\\\\].*`,
),
],
},
};
module.exports = mergeConfig(getDefaultConfig(projectRoot), config);