Skip to content

Commit c39035e

Browse files
committed
fix: path resolving
1 parent 14f0d48 commit c39035e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ function normalizeId(id) {
109109
function toFilePath(id, server) {
110110
let absolute = id.startsWith('/@fs/')
111111
? id.slice(4)
112-
: slash(resolve(server.config.root, id.slice(1)))
112+
: id.startsWith(dirname(server.config.root))
113+
? id
114+
: slash(resolve(server.config.root, id.slice(1)))
113115

114116
if (absolute.startsWith('//'))
115117
absolute = absolute.slice(1)

0 commit comments

Comments
 (0)