diff --git a/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionRequest.js b/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionRequest.js index dfe0e6f2..4196c378 100644 --- a/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionRequest.js +++ b/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionRequest.js @@ -296,6 +296,12 @@ class ResolutionRequest { return result; } + function resolveKeyWithPromise( + [key: TModule, promise: Promise>], + ): Promise<[TModule, Array]> { + return promise.then(value => [key, value]); + } + return Promise.all([ // kicks off recursive dependency discovery, but doesn't block until it's // done @@ -901,10 +907,6 @@ function resolveWindowsPath(modulePath) { return path.resolve(modulePath); } -function resolveKeyWithPromise([key, promise]) { - return promise.then(value => [key, value]); -} - function isRelativeImport(filePath) { return /^[.][.]?(?:[/]|$)/.test(filePath); }