forked from software-mansion/react-native-gesture-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetro.config.js
More file actions
52 lines (49 loc) · 1.3 KB
/
metro.config.js
File metadata and controls
52 lines (49 loc) · 1.3 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
const blacklist = require('metro-config/src/defaults/blacklist');
const path = require('path');
const glob = require('glob-to-regexp');
function getBlacklist() {
const nodeModuleDirs = [
glob(`${path.resolve(__dirname, '..')}/node_modules/*`),
glob(`${path.resolve(__dirname)}/node_modules/metro/node_modules/fbjs/*`),
glob(
`${path.resolve(
__dirname
)}/node_modules/create-react-context/node_modules/fbjs/*`
),
glob(
`${path.resolve(
__dirname
)}/node_modules/create-react-class/node_modules/fbjs/*`
),
glob(
`${path.resolve(
__dirname
)}/node_modules/react-navigation/node_modules/hoist-non-react-statics/*`
),
glob(
`${path.resolve(
__dirname
)}/node_modules/react-navigation-tabs/node_modules/hoist-non-react-statics/*`
),
glob(
`${path.resolve(
__dirname
)}/node_modules/react-native-safe-area-view/node_modules/hoist-non-react-statics/*`
),
];
return blacklist(nodeModuleDirs);
}
module.exports = {
resolver: {
blacklistRE: getBlacklist(),
providesModuleNodeModules: [
'react-native',
'react',
'invariant',
'fbjs',
'prop-types',
'hoist-non-react-statics',
],
},
watchFolders: [path.resolve(__dirname, '..')],
};