We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e9298c commit cec7c51Copy full SHA for cec7c51
samples/react-native/metro.config.js
@@ -19,6 +19,21 @@ const config = {
19
`${parentDir}/node_modules`,
20
],
21
resolver: {
22
+ resolveRequest: (context, moduleName, platform) => {
23
+ if (moduleName.includes('promise/')) {
24
+ return context.resolveRequest(
25
+ {
26
+ ...context,
27
+ // Ensures the promise module is resolved from the sample's node_modules.
28
+ allowHaste: false,
29
+ disableHierarchicalLookup: true,
30
+ },
31
+ moduleName,
32
+ platform,
33
+ );
34
+ }
35
+ return context.resolveRequest(context, moduleName, platform);
36
37
blacklistRE: blacklist([
38
new RegExp(`${parentDir}/node_modules/react-native/.*`),
39
new RegExp('.*\\android\\.*'), // Required for Windows in order to run the Sample.
0 commit comments