forked from emekalites/react-native-alarm-notification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
metro.config.js
43 lines (38 loc) · 1.15 KB
/
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
35
36
37
38
39
40
41
42
43
// metro.config.js
//
// with multiple workarounds for this issue with symlinks:
// https://github.com/facebook/metro/issues/1
//
// with thanks to @johnryan (<https://github.com/johnryan>)
// for the pointers to multiple workaround solutions here:
// https://github.com/facebook/metro/issues/1#issuecomment-541642857
//
// see also this discussion:
// https://github.com/brodybits/create-react-native-module/issues/232
const path = require('path')
const watchFolders = [
path.resolve(__dirname + "/.."),
path.resolve(__dirname + "/"),
];
module.exports = {
// workaround for an issue with symlinks encountered starting with
// [email protected] / React Native 0.61
// (not needed with React Native 0.60 / [email protected])
resolver: {
extraNodeModules: new Proxy(
{},
{ get: (_, name) => path.resolve('.', 'node_modules', name) }
)
},
transformer: {
getTransformOptions: async () => ({
transform: {
// this defeats the RCTDeviceEventEmitter is not a registered callable module
inlineRequires: true,
},
}),
},
// quick workaround for another issue with symlinks
// watchFolders: ['.', '..']
watchFolders
}