Skip to content

Commit 837e354

Browse files
authored
Pass-through file urls to Deno.readFile (#2600)
1 parent e4ab260 commit 837e354

File tree

1 file changed

+1
-5
lines changed
  • crates/cli-support/src/js

1 file changed

+1
-5
lines changed

crates/cli-support/src/js/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,7 @@ impl<'a> Context<'a> {
326326
let wasmCode = '';
327327
switch (wasm_url.protocol) {{
328328
case 'file:':
329-
let wasm_pathname = wasm_url.pathname;
330-
if (Deno.build.os === 'windows' && wasm_pathname.startsWith('/')) {{
331-
wasm_pathname = wasm_pathname.substr(1);
332-
}}
333-
wasmCode = await Deno.readFile(wasm_pathname);
329+
wasmCode = await Deno.readFile(wasm_url);
334330
break
335331
case 'https:':
336332
case 'http:':

0 commit comments

Comments
 (0)