Skip to content

Commit 348029b

Browse files
fix: Set loader: { '.wasm': 'copy' } in esbuild config in adapter-vercel (#9944)
* fix: Enable wasm copy in adapter-vercel * Create olive-rings-eat.md --------- Co-authored-by: Rich Harris <[email protected]>
1 parent a6338a0 commit 348029b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/olive-rings-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@sveltejs/adapter-vercel": patch
3+
---
4+
5+
fix: Copy .wasm files during build

packages/adapter-vercel/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ const plugin = function (defaults = {}) {
117117
format: 'esm',
118118
external: config.external,
119119
sourcemap: 'linked',
120-
banner: { js: 'globalThis.global = globalThis;' }
120+
banner: { js: 'globalThis.global = globalThis;' },
121+
loader: {
122+
'.wasm': 'copy'
123+
}
121124
});
122125

123126
write(

0 commit comments

Comments
 (0)