Skip to content

Commit

Permalink
Prefer url.fileURLToPath
Browse files Browse the repository at this point in the history
Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
  • Loading branch information
eps1lon and unstubbable authored Oct 28, 2024
1 parent 933d739 commit 4c97f7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/server/patch-error-inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function frameToString(frame: StackFrame): string {
// In a multi-app repo, this leads to potentially larger file names but will make clicking snappy.
// There's no tradeoff for the cases where `dir` in `next dev [dir]` is omitted
// since relative to cwd is both the shortest and snappiest.
path.relative(process.cwd(), new URL(frame.file).pathname)
path.relative(process.cwd(), url.fileURLToPath(frame.file))
: frame.file

return frame.methodName
Expand Down

0 comments on commit 4c97f7f

Please sign in to comment.