workers-sdk
workers-sdk copied to clipboard
🚀 Feature Request: Support for ".wasm" and other data blobs imports for `vite-plugin-cloudflare`
Describe the solution
It would be great if vite-plugin-cloudflare resolves esm .wasm, .bin imports just like wrangler does.
For example:
// src/worker.ts
import photonWasmModule from "./photon.wasm";
import fontData from "./font.ttf.bin";
It should also resolve these imports if they are used in a package for example @cf-wasm/photon.
Thanks for the request! Wasm support is coming very soon (#8031) and support for more general rules will be added in a follow up PR.
Thanks 🙏! I am exploring vite-plugin-cloudflare, works great but I found some behaviours which are different from wrangler. Will create separate issues for them. Thanks again for this plugin ⛅.