-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Astro Info
Astro v6.0.0-beta.6
Vite v7.3.1
Node v25.6.1
System macOS (arm64)
Package Manager npm
Output server
Adapter @astrojs/cloudflare (v13.0.0-beta.3)
Integrations @astrojs/mdx (v5.0.0-beta.3)
@astrojs/react (v4.4.2)
@astrojs/sitemap (v3.6.1-beta.2)
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I am upgrading a project from Astro 5 to Astro 6 using the @astrojs/cloudflare adapter. My project relies on the library(https://developers.cloudflare.com/pages/functions/plugins/vercel-og) that loads a .wasm file at runtime.
In Astro 5:
The build process seemed to bundle or place the WASM file in a location accessible to the Worker script, or the single dist structure allowed relative path resolution.
In Astro 6:
The .wasm file is strictly emitted to dist/client/_astro/file.wasm.
However, the server logic (the Worker) is compiled to dist/_worker.js.
When the Worker runs on Cloudflare, it crashes because it attempts to load the WASM file, but the file is not bundled into the Worker, nor is it accessible via the relative path expected by the library.
What's the expected result?
Server-side dependencies that require WASM should either:
- Be automatically bundled into the
_worker.js(if small enough). - Or, the adapter should provide a mechanism to map these assets so the Worker can resolve them from the client assets folder at runtime.
Link to Minimal Reproducible Example
https://stackblitz.com/afk-and-will-update-soon
Participation
- I am willing to submit a pull request for this issue.