Skip to content

Commit b061166

Browse files
fix: Set loader: { '.wasm': 'copy' } in esbuild config in adapter-cloudflare (#9909)
Copies WASM files in Cloudflare instead of trying to load them. Closes #9890.
1 parent 9f5642d commit b061166

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/honest-news-hunt.md

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

packages/adapter-cloudflare/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ export default function (options = {}) {
5454
outfile: `${dest}/_worker.js`,
5555
allowOverwrite: true,
5656
format: 'esm',
57-
bundle: true
57+
bundle: true,
58+
loader: {
59+
'.wasm': 'copy'
60+
}
5861
});
5962
}
6063
};

0 commit comments

Comments
 (0)