Treat wasm import as binary, remove nonstandard import attribute on esbuild.wasm

This commit is contained in:
Alex Gleason committed 2025-11-14 12:39:52 -06:00
1 parent 8ecf460140
commit 65c51e865a
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -426,6 +426,8 @@ export function esmPlugin(options: EsmPluginOptions): Plugin {
loader = "js";
} else if (contentType === "text/css") {
loader = "css";
} else if (contentType === "application/wasm") {
loader = "binary";
} else {
loader = "text";
}
+1 -1
View File
@@ -1,5 +1,5 @@
import type _ESBuild from "esbuild-wasm";
import wasmUrl from "esbuild-wasm/esbuild.wasm?url" with { type: "url" };
import wasmUrl from "esbuild-wasm/esbuild.wasm?url";
type ESBuild = typeof _ESBuild;