Skip to content

Commit 1bde4d2

Browse files
authored
feat(client): support opening fileURL in editor (#20040)
1 parent 7753b02 commit 1bde4d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/client/overlay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const createTemplate = () =>
200200
h('style', {}, templateStyle),
201201
)
202202

203-
const fileRE = /(?:[a-zA-Z]:\\|\/).*?:\d+:\d+/g
203+
const fileRE = /(?:file:\/\/)?(?:[a-zA-Z]:\\|\/).*?:\d+:\d+/g
204204
const codeframeRE = /^(?:>?\s*\d+\s+\|.*|\s+\|\s*\^.*)\r?\n/gm
205205

206206
// Allow `ErrorOverlay` to extend `HTMLElement` even in environments where

0 commit comments

Comments
 (0)