Skip to content

Commit 5d4e82d

Browse files
authored
fix: Improve how @fs urls are printed (#2362)
1 parent b5cd8c8 commit 5d4e82d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/vite/src/node/utils.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,7 @@ export function prettifyUrl(url: string, root: string) {
166166
url = removeTimestampQuery(url)
167167
const isAbsoluteFile = url.startsWith(root)
168168
if (isAbsoluteFile || url.startsWith(FS_PREFIX)) {
169-
let file = path.relative(
170-
root,
171-
isAbsoluteFile ? url : url.slice(FS_PREFIX.length)
172-
)
169+
let file = path.relative(root, isAbsoluteFile ? url : fsPathFromId(url))
173170
const seg = file.split('/')
174171
const npmIndex = seg.indexOf(`node_modules`)
175172
const isSourceMap = file.endsWith('.map')

0 commit comments

Comments
 (0)