Skip to content

Commit

Permalink
fix(metro-resolver): use proper isRelativeImport check that works w…
Browse files Browse the repository at this point in the history
…ith Windows paths
  • Loading branch information
byCedric committed Jun 12, 2024
1 parent 3050e27 commit 8c4c199
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/metro-resolver/src/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ function resolveWindowsPath(modulePath: string) {
}

function isRelativeImport(filePath: string) {
return /^[.][.]?(?:[/]|$)/.test(filePath);
return /^[.][.]?(?:[/\\]|$)/.test(filePath);
}

function normalizePath(modulePath: any | string) {
Expand Down

0 comments on commit 8c4c199

Please sign in to comment.