Skip to content

Commit

Permalink
fix: normalize prettify url (#15705)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Jan 25, 2024
1 parent fb4bddc commit 98bc3dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vite/src/node/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,10 @@ export function prettifyUrl(url: string, root: string): string {
url = removeTimestampQuery(url)
const isAbsoluteFile = url.startsWith(root)
if (isAbsoluteFile || url.startsWith(FS_PREFIX)) {
const file = path.relative(root, isAbsoluteFile ? url : fsPathFromId(url))
const file = path.posix.relative(
root,
isAbsoluteFile ? url : fsPathFromId(url),
)
return colors.dim(file)
} else {
return colors.dim(url)
Expand Down

0 comments on commit 98bc3dc

Please sign in to comment.