Skip to content

Commit

Permalink
Merging f528a77 into trunk-temp/pr-837/09523f76-f3dc-4e97-9761-a40096…
Browse files Browse the repository at this point in the history
…e35f8f
  • Loading branch information
trunk-io[bot] authored May 29, 2024
2 parents e6321af + f528a77 commit 51f6f8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions analyze/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ const wasmBase64 = "data:application/wasm;base64,${wasm.toString("base64")}";
*/
// TODO: Switch back to top-level await when our platforms all support it
export async function wasm() {
// This uses fetch to decode the wasm data url
const wasmDecode = await fetch(wasmBase64);
// This uses fetch to decode the wasm data url, but disabling cache so files
// larger than 2mb don't fail to parse in the Next.js App Router
const wasmDecode = await fetch(wasmBase64, { cache: "no-store" });
const buf = await wasmDecode.arrayBuffer();
// And then we return it as a WebAssembly.Module
return WebAssembly.compile(buf);
Expand Down

0 comments on commit 51f6f8c

Please sign in to comment.