Skip to content

Commit

Permalink
fix: encode uri when constructing file:// url (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Aug 12, 2022
1 parent a37deb9 commit 26c02d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function normalizeid (id: string): string {
if (BUILTIN_MODULES.has(id)) {
return 'node:' + id
}
return 'file://' + normalizeSlash(id)
return 'file://' + normalizeSlash(encodeURI(id))
}

export async function loadURL (url: string): Promise<string> {
Expand Down

0 comments on commit 26c02d5

Please sign in to comment.