forked from kristerkari/pinar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
metro.config.js
30 lines (28 loc) · 956 Bytes
/
metro.config.js
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
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const path = require("path");
const exclusionList = require("metro-config/src/defaults/exclusionList");
/**
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
*
* @type {import('metro-config').MetroConfig}
*/
const config = {
resolver: {
blacklistRE: exclusionList([/\/pinar\/node_modules\/react-native\/.*/]),
extraNodeModules: {
react: path.resolve(__dirname, "node_modules/react"),
"react-native": path.resolve(__dirname, "node_modules/react-native"),
},
},
/**
* Add our workspace roots so that react native can find the source code for the included packages
* in the monorepo
*/
projectRoot: path.resolve(__dirname),
watchFolders: [
path.resolve(__dirname, "../src"),
path.resolve(__dirname, "../node_modules"),
],
};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);