Skip to content

Commit

Permalink
fix: Set loader: { '.wasm': 'copy' } in esbuild config in `adapter-…
Browse files Browse the repository at this point in the history
…vercel` (#9944)

* fix: Enable wasm copy in adapter-vercel

* Create olive-rings-eat.md

---------

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
  • Loading branch information
1 parent a6338a0 commit 348029b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/olive-rings-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/adapter-vercel": patch
---

fix: Copy .wasm files during build
5 changes: 4 additions & 1 deletion packages/adapter-vercel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ const plugin = function (defaults = {}) {
format: 'esm',
external: config.external,
sourcemap: 'linked',
banner: { js: 'globalThis.global = globalThis;' }
banner: { js: 'globalThis.global = globalThis;' },
loader: {
'.wasm': 'copy'
}
});

write(
Expand Down

0 comments on commit 348029b

Please sign in to comment.