Skip to content

Commit

Permalink
fix: decode path before reading sourcemap source content
Browse files Browse the repository at this point in the history
close #2524
  • Loading branch information
yyx990803 committed Mar 16, 2021
1 parent cbfc3e9 commit 73b80d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/sourcemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export async function injectSourcesContent(
await Promise.all(
map.sources.map(async (sourcePath, i) => {
map.sourcesContent![i] = await fs.readFile(
path.resolve(sourceRoot, sourcePath),
path.resolve(sourceRoot, decodeURI(sourcePath)),
'utf-8'
)
})
Expand Down

0 comments on commit 73b80d5

Please sign in to comment.