forked from BitCraftIO/Hail
-
Notifications
You must be signed in to change notification settings - Fork 2
/
rn-cli.config.js
73 lines (65 loc) · 2.31 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
'use strict';
const blacklist = require('metro/src/blacklist');
module.exports = {
/**
* Add search paths to the packager. Equivalent to the
* `--projectRoots` command line argument.
*
* Your app project directory is the default, but you can easily add
* additional directories.
*
* This is very handy when you maintain all your software in one big
* repo, which means your app's dependencies aren't necessarily just
* located in `./node_modules` but potentially in sibling
* directories or other locations.
*/
getProjectRoots() {
return [__dirname];
},
/**
* Specify additional file extensions for assets. For example, if
* you want to include a .ttf file, you would return ['ttf'] from
* here and use `require('./fonts/example.ttf')` inside your app.
*
* Equivalent to the `--assetExts` command line argument.
*/
getAssetExts() {
return [];
},
/**
* Specify any additional platforms to be used by the packager.
* For example, if you want to add a "custom" platform, and use modules
* ending in .custom.js, you would return ['custom'] here.
*
* Equivalent to the `--platforms` command line argument.
*/
getPlatforms() {
return [];
},
/**
* The React Native packager can be a bit fussy. For instance, it
* does not like come across duplicate packages. It can also be slow
* to traverse deep directory structures that you know won't have
* app dependencies in them. Putting those directories on the
* blacklist will stop the packager from traversing into them.
*/
getBlacklistRE() {
const additionalBlacklist = [
];
return blacklist(additionalBlacklist);
},
/**
* This is the bombshell. New in React Native 0.30, this allows you
* to specify your own code transformer.
*
* In essense, instead of specifying your own `.babelrc` file,
* you'll want to specify your own transformer. That way, when
* running a regular node program such as the packager itself, the
* special transforms your app needs won't be applied.
*
* Equivalent to the `--transformer` command line argument.
*/
getTransformModulePath() {
return require.resolve('./transformer');
},
};