forked from wahello/peerio-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rn-cli.config.js
33 lines (30 loc) · 983 Bytes
/
rn-cli.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
var blacklist = require('metro/src/blacklist');
var path = require('path');
var projectRoot = path.resolve(__dirname);
// As the metro bundler does not support linking correctly, we add additional
// search path queries to all modules.
const extraNodeModulesGetter = {
get: (target, name) => {
if (name === 'crypto') {
return path.join(projectRoot, 'app/lib/crypto');
}
if (name === 'minipdf_js.js') {
throw new Error('Throw minipdf js');
}
}
};
var config = {
getBlacklistRE() {
return blacklist([/app\/lib\/peerio-icebear\/node_modules\/.*/]);
},
getTransformModulePath() {
return require.resolve('react-native-typescript-transformer');
},
getSourceExts() {
return ['ts', 'tsx'];
},
extraNodeModules: new Proxy({}, extraNodeModulesGetter)
};
console.log('loading custom config for packager');
console.log(`config root: ${projectRoot}`);
module.exports = config;