diff --git a/apps/docs/content/guides/functions/wasm.mdx b/apps/docs/content/guides/functions/wasm.mdx index b1c26e34de2..024d585b210 100644 --- a/apps/docs/content/guides/functions/wasm.mdx +++ b/apps/docs/content/guides/functions/wasm.mdx @@ -77,7 +77,7 @@ Before deploying the Edge Function, we need to ensure it bundles the Wasm module ```toml [functions.wasm-add] -static_files = [ "./functions/wasm-add/add-wasm/pkg/*.wasm"] +static_files = [ "./functions/wasm-add/add-wasm/pkg/*"] ``` Deploy the function by running: diff --git a/examples/edge-functions/supabase/functions/wasm-modules/index.ts b/examples/edge-functions/supabase/functions/wasm-modules/index.ts index 66d5085cf24..12774ae77f8 100644 --- a/examples/edge-functions/supabase/functions/wasm-modules/index.ts +++ b/examples/edge-functions/supabase/functions/wasm-modules/index.ts @@ -1,11 +1,4 @@ -const wasmBuffer = await Deno.readFile( - new URL("./add-wasm/pkg/add_wasm_bg.wasm", import.meta.url), -); - -const { instance } = await WebAssembly.instantiate( - wasmBuffer, -); -const { add } = instance.exports; +import { add } from "./add-wasm/pkg/add_wasm.js"; Deno.serve(async (req) => { const { a, b } = await req.json();