Skip to content

Commit

Permalink
fix: ensure Deno 2.0 instantiates local files streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Nov 22, 2024
1 parent 8934b4e commit af756fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/wasmbuild.generated.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ class WasmBuildLoader {
const isFile = url.protocol === "file:";

// make file urls work in Node via dnt
const isNode = globalThis.process?.versions?.node != null;
const isNode = globalThis.Deno == null
&& globalThis.process?.versions?.node != null
&& globalThis.Buffer != null;
if (isFile && typeof Deno !== "object") {
throw new Error(
"Loading local files are not supported in this environment",
Expand Down

0 comments on commit af756fe

Please sign in to comment.