forked from callstack/react-native-paper
-
Notifications
You must be signed in to change notification settings - Fork 2
/
metro.config.js
34 lines (29 loc) · 819 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
31
32
33
34
// /* eslint-disable import/no-commonjs */
const path = require('path');
const blacklist = require('metro-config/src/defaults/blacklist');
const pak = require('../package.json');
const escape = require('escape-string-regexp');
const dependencies = Object.keys(pak.dependencies);
module.exports = {
projectRoot: __dirname,
watchFolders: [path.resolve(__dirname, '..')],
resolver: {
blacklistRE: blacklist([
new RegExp(
`^${escape(path.resolve(__dirname, '..', 'node_modules'))}\\/.*$`
),
new RegExp(
`^${escape(
path.resolve(__dirname, '..', 'docs', 'node_modules')
)}\\/.*$`
),
]),
providesModuleNodeModules: [
'react-native',
'react',
'@expo/vector-icons',
'@babel/runtime',
...dependencies,
],
},
};