Skip to content

Commit

Permalink
fix: ensure Deno 2.0 instantiates local files streaming (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Nov 22, 2024
1 parent 4a50686 commit 6bcc6fb
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 @@ -295,7 +295,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 6bcc6fb

Please sign in to comment.