mirror of https://github.com/status-im/metro.git
Fix 'isRelativeImport' to allow require('.') and require('..')
Summary: davidaurelio 👍 Closes https://github.com/facebook/react-native/pull/10006 Differential Revision: D3898703 fbshipit-source-id: 6d88122ed56108d52bc1ae1b14c7ff7c39fd9b9a
This commit is contained in:
parent
bb1666a93a
commit
6bcad15e7b
|
@ -533,7 +533,7 @@ function resolveKeyWithPromise([key, promise]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function isRelativeImport(path) {
|
function isRelativeImport(path) {
|
||||||
return /^[.][.]?[/]/.test(path);
|
return /^[.][.]?(?:[/]|$)/.test(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = ResolutionRequest;
|
module.exports = ResolutionRequest;
|
||||||
|
|
Loading…
Reference in New Issue