Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature Request: Support for ".wasm" and other data blobs imports for vite-plugin-cloudflare #8022

Closed
Tracked by #9
kumardeo opened this issue Feb 4, 2025 · 2 comments
Labels
enhancement New feature or request vite-plugin Relating to the `@cloudflare/vite-plugin` package

Comments

@kumardeo
Copy link

kumardeo commented Feb 4, 2025

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.

@kumardeo kumardeo added the enhancement New feature or request label Feb 4, 2025
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Feb 4, 2025
@emily-shen emily-shen added the vite-plugin Relating to the `@cloudflare/vite-plugin` package label Feb 4, 2025
@emily-shen emily-shen removed this from workers-sdk Feb 4, 2025
@jamesopstad
Copy link
Contributor

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.

@kumardeo
Copy link
Author

kumardeo commented Feb 5, 2025

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 ⛅.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vite-plugin Relating to the `@cloudflare/vite-plugin` package
Projects
None yet
Development

No branches or pull requests

3 participants