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
…cloudflare` (#9909)

Copies WASM files in Cloudflare instead of trying to load them. Closes #9890.
  • Loading branch information
tcc-sejohnson committed May 15, 2023
1 parent 9f5642d commit b061166
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/honest-news-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-cloudflare': patch
---

fix: Copy .wasm files during build
5 changes: 4 additions & 1 deletion packages/adapter-cloudflare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ export default function (options = {}) {
outfile: `${dest}/_worker.js`,
allowOverwrite: true,
format: 'esm',
bundle: true
bundle: true,
loader: {
'.wasm': 'copy'
}
});
}
};
Expand Down

0 comments on commit b061166

Please sign in to comment.