mirror of
https://github.com/status-im/metro.git
synced 2025-02-08 09:14:39 +00:00
Add support for relative paths to ResolutionRequest
Summary: This makes ResolutionRequest stop calling `dirname` when arriving at `"."`, not only at `parse(path).root`. Needed for Buck integration, as we are using relative paths there Reviewed By: cpojer Differential Revision: D4058723 fbshipit-source-id: d1856043193cfad3f750577ba0f63f03f8effe7a
This commit is contained in:
parent
18c4ae81e7
commit
74a5b35802
@ -356,7 +356,7 @@ class ResolutionRequest {
|
||||
|
||||
const searchQueue = [];
|
||||
for (let currDir = path.dirname(fromModule.path);
|
||||
currDir !== realPath.parse(fromModule.path).root;
|
||||
currDir !== '.' && currDir !== realPath.parse(fromModule.path).root;
|
||||
currDir = path.dirname(currDir)) {
|
||||
const searchPath = path.join(currDir, 'node_modules');
|
||||
if (this._fastfs.dirExists(searchPath)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user