-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Cloudflare adapter doesn't support WASM, despite natively supporting WASM modules #8541
Closed
1 task done
Labels
- P2: nice to have
Not breaking anything but nice to have (priority)
Comments
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 13, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 14, 2023
lilnasy
added
- P2: nice to have
Not breaking anything but nice to have (priority)
pkg: cloudflare
and removed
needs triage
Issue needs to be triaged
labels
Sep 14, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 15, 2023
adrianlyjak
added a commit
to adrianlyjak/astro
that referenced
this issue
Sep 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When attempting to import and bundle a wasm module, the cloudflare adapter throws errors from vite and esbuild, despite wasm module import being possible in native cloudflare worker imports.
When attempting to import a wasm file, you'll see the following error during an
astro dev
server:This appears to be coming from the initial vite build. Adding vite plugin for wasm, such as this, and marking the import as a
.wasm?module
is promising: it gets the astro dev server running. However when running astro build, further errors are thrown when esbuild doesn't know what to do with the.wasm
import when bundling.What's the expected result?
It seems like wasm module style imports should be relatively straight forward to support since they are native to cloudflare. From what I've tried, its also the only way in cloudflare to import a wasm file. (loading a fetched file from binary throws errors in the cloudflare runtime).
Additionally, adding support for wasm in cloudflare should also help add sharp support to the cloudflare adapter in the future once there's a web assembly build of sharp
Link to Minimal Reproducible Example
https://github.com/adrianlyjak/astro/tree/1d780c08b44184a2306a8ba181160e4928a88cd6/packages/integrations/cloudflare/test/fixtures/wasm
Participation
The text was updated successfully, but these errors were encountered: