Skip to content

Commit

Permalink
fix: file link in overlay with custom backend (#14879)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Nov 6, 2023
1 parent 1426f57 commit 1bfb584
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/vite/src/client/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,12 @@ export class ErrorOverlay extends HTMLElement {
link.textContent = file
link.className = 'file-link'
link.onclick = () => {
fetch(`${base}__open-in-editor?file=` + encodeURIComponent(file))
fetch(
new URL(
`${base}__open-in-editor?file=${encodeURIComponent(file)}`,
import.meta.url,
),
)
}
el.appendChild(link)
curIndex += frag.length + file.length
Expand Down

0 comments on commit 1bfb584

Please sign in to comment.