Skip to content

Commit bbf409c

Browse files
blacklist -> exclusionList migration for examples metro.config.js (#168)
* Update react-native version to 0.64.0 The react-native version needs to be updated to 0.64.x so it will support the blacklist -> exclusionList migration. 0.64.0 has been chosen as the initial stable version. NOTE: For an incoming Windows support the 0.64.0 is also the required version of react-native * Change blacklist to exclusionList in example's metro config * Change resolver field to blacklistRE It turns out that in the metro there's still a blacklist used for a resolver field. This makes the metro to be unable to find the new word. To fix that, the blacklistRE field name is brought back.
1 parent 0de461d commit bbf409c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/create-react-native-library/templates/common/$package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"pod-install": "^0.1.0",
6363
"prettier": "^2.0.5",
6464
"react": "16.13.1",
65-
"react-native": "0.63.4",
65+
"react-native": "0.64.0",
6666
"react-native-builder-bob": "^<%- bob.version %>",
6767
"release-it": "^14.2.2",
6868
"typescript": "^4.1.3"

packages/create-react-native-library/templates/common/example/metro.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const path = require('path');
2-
const blacklist = require('metro-config/src/defaults/blacklist');
2+
const exclusionList = require('metro-config/src/defaults/exclusionList');
33
const escape = require('escape-string-regexp');
44
const pak = require('../package.json');
55

@@ -14,9 +14,9 @@ module.exports = {
1414
watchFolders: [root],
1515

1616
// We need to make sure that only one version is loaded for peerDependencies
17-
// So we blacklist them at the root, and alias them to the versions in example's node_modules
17+
// So we block them at the root, and alias them to the versions in example's node_modules
1818
resolver: {
19-
blacklistRE: blacklist(
19+
blacklistRE: exclusionList(
2020
modules.map(
2121
(m) =>
2222
new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)

0 commit comments

Comments
 (0)