forked from remix-run/react-router
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrn-cli.config.js
29 lines (22 loc) · 977 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
const path = require('path');
const blacklist = require('react-native/packager/blacklist');
const config = require('react-native/packager/rn-cli.config');
const rootPackagePath = path.join(__dirname, '..', '..');
config.getBlacklist = () => [
new RegExp(`^${escapeRegExp(rootPackagePath)}\/node_modules(.*)`),
new RegExp(`^${escapeRegExp(rootPackagePath)}\/packages\/(react-router-dom|react-router-website(-*)?)\/(.*)`),
new RegExp(`^${escapeRegExp(rootPackagePath)}\/packages\/react-router-native\/node_modules\/react-router(.*)`),
//new RegExp(`^${escapeRegExp(rootPackagePath)}\/packages\/react-router\/node_modules\/(.*)`),
];
config.getBlacklistRE = () => blacklist(config.getBlacklist());
config.getProjectRoots = () => getRoots();
config.getAssetRoots = () => getRoots();
function getRoots() {
return [
path.join(__dirname, '../../'),
];
}
function escapeRegExp(s) {
return s.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
}
module.exports = config;