Skip to content

Commit a308e98

Browse files
authored
Remove redundant blacklist (#267)
1 parent d60629a commit a308e98

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

metro.config.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
const path = require('path');
22
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
3-
const escape = require('escape-string-regexp');
4-
const exclusionList = require('metro-config/src/defaults/exclusionList');
5-
const pkg = require('./package.json');
63

74
const root = path.resolve(__dirname);
85
const sample = path.resolve(root, 'sample');
96

10-
const modules = Object.keys({...pkg.peerDependencies});
117
/**
128
* Metro configuration
139
* https://reactnative.dev/docs/metro
@@ -19,15 +15,7 @@ const config = mergeConfig(getDefaultConfig(__dirname), {
1915

2016
watchFolders: [root],
2117

22-
// We need to make sure that only one version is loaded for peerDependencies
23-
// So we block them at the root, and alias them to the versions in example's node_modules
2418
resolver: {
25-
blacklistRE: exclusionList(
26-
modules.map(
27-
m => new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`),
28-
),
29-
),
30-
3119
extraNodeModules: {
3220
react: path.resolve(sample, 'node_modules', 'react'),
3321
'react-native': path.resolve(sample, 'node_modules', 'react-native'),

0 commit comments

Comments
 (0)