Skip to content

Commit 8c4c199

Browse files
committed
fix(metro-resolver): use proper isRelativeImport check that works with Windows paths
1 parent 3050e27 commit 8c4c199

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/metro-resolver/src/resolve.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ function resolveWindowsPath(modulePath: string) {
508508
}
509509

510510
function isRelativeImport(filePath: string) {
511-
return /^[.][.]?(?:[/]|$)/.test(filePath);
511+
return /^[.][.]?(?:[/\\]|$)/.test(filePath);
512512
}
513513

514514
function normalizePath(modulePath: any | string) {

0 commit comments

Comments
 (0)