Skip to content

Commit 73b80d5

Browse files
committed
fix: decode path before reading sourcemap source content
close #2524
1 parent cbfc3e9 commit 73b80d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/node/server/sourcemap.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export async function injectSourcesContent(
1212
await Promise.all(
1313
map.sources.map(async (sourcePath, i) => {
1414
map.sourcesContent![i] = await fs.readFile(
15-
path.resolve(sourceRoot, sourcePath),
15+
path.resolve(sourceRoot, decodeURI(sourcePath)),
1616
'utf-8'
1717
)
1818
})

0 commit comments

Comments
 (0)