Skip to content

Commit

Permalink
fix: Improve how @fs urls are printed (#2362)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElMassimo committed Mar 6, 2021
1 parent b5cd8c8 commit 5d4e82d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/vite/src/node/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,7 @@ export function prettifyUrl(url: string, root: string) {
url = removeTimestampQuery(url)
const isAbsoluteFile = url.startsWith(root)
if (isAbsoluteFile || url.startsWith(FS_PREFIX)) {
let file = path.relative(
root,
isAbsoluteFile ? url : url.slice(FS_PREFIX.length)
)
let file = path.relative(root, isAbsoluteFile ? url : fsPathFromId(url))
const seg = file.split('/')
const npmIndex = seg.indexOf(`node_modules`)
const isSourceMap = file.endsWith('.map')
Expand Down

0 comments on commit 5d4e82d

Please sign in to comment.