Title: Native deploy fails when a framework Worker imports Wasm, text or data modules · Issue #535 · voidzero-dev/void · GitHub
Open Graph Title: Native deploy fails when a framework Worker imports Wasm, text or data modules · Issue #535 · voidzero-dev/void
X Title: Native deploy fails when a framework Worker imports Wasm, text or data modules · Issue #535 · voidzero-dev/void
Description: Problem void deploy --platform cloudflare fails for a SvelteKit app whose Worker imports a .wasm module (e.g. @resvg/resvg-wasm). vp build passes; the failure is in "Preparing deployment", before upload: Rolldown failed to resolve import...
Open Graph Description: Problem void deploy --platform cloudflare fails for a SvelteKit app whose Worker imports a .wasm module (e.g. @resvg/resvg-wasm). vp build passes; the failure is in "Preparing deployment", before u...
X Description: Problem void deploy --platform cloudflare fails for a SvelteKit app whose Worker imports a .wasm module (e.g. @resvg/resvg-wasm). vp build passes; the failure is in "Preparing deployment"...
Opengraph URL: https://github.com/voidzero-dev/void/issues/535
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Native deploy fails when a framework Worker imports Wasm, text or data modules","articleBody":"## Problem\n\n`void deploy --platform cloudflare` fails for a SvelteKit app whose Worker imports a `.wasm` module (e.g. `@resvg/resvg-wasm`). `vp build` passes; the failure is in \"Preparing deployment\", before upload:\n\n```\nRolldown failed to resolve import \"wbg\" from \".../@resvg/resvg-wasm/index_bg.wasm\".\n```\n\nText and Data modules (`.txt`, `.html`, `.sql`, `.bin`) fail the same way: they are parsed as JavaScript.\n\n## Cause\n\n`prepareCfFrameworkBuildOutput` re-bundles the adapter's `_worker.js` with a plain Vite lib build (`prepareBundledBuildOutput`, `configFile: false`). That build lacks the additional module handling of `@cloudflare/vite-plugin`, although `copyBundle` already maps these extensions to `wasm`, `text` and `data` module types.\n\n## Repro\n\nA framework output whose `_worker.js` does `import mod from './x.wasm'` (or `./x.txt`, `./x.bin`) fails in `prepareCfFrameworkBuildOutput`. A wasm-bindgen module fails with the `wbg` error above.\n\n## Suggested fix\n\nApply the Cloudflare Vite plugin's additional module rules in that build: keep matching imports external and emit the files beside the bundle, so `copyBundle` uploads them with their module types.\n\nThe hosted path's `bundleEntry` (`wrapper.ts`) uses a similar lib build and may need the same treatment; not verified.\n","author":{"url":"https://github.com/Pleasurecruise","@type":"Person","name":"Pleasurecruise"},"datePublished":"2026-10-21T20:45:16Z","url":"https://github.com/voidzero-dev/void/issues/535"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ce604de0-17d6-af34-606c-235f16254806 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C694:3D53D8:204ED43:2B86266:6AFBA5DE |
| html-safe-nonce | 1eda4049375e3b0f5032cbb41f792e9f1a81f05e0289d95bfd76bd8d3a4bb577 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjk0OjNENTNEODoyMDRFRDQzOjJCODYyNjY6NkFGQkE1REUiLCJ2aXNpdG9yX2lkIjoiMzU1OTg1NzQ1ODY2ODg3MzE4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | da8a030de9f5fcd7d8e0ef291ce329135394e1fc181b48bcb6d11aa205ae461e |
| hovercard-subject-tag | issue:5968239766 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/voidzero-dev/void/535/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4a82abb47e785a24237bdc10b9c199aa928c4d66f2a06e19b91f20cf85d4a4d2/voidzero-dev/void/issues/535 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4a82abb47e785a24237bdc10b9c199aa928c4d66f2a06e19b91f20cf85d4a4d2/voidzero-dev/void/issues/535 |
| og:image:alt | Problem void deploy --platform cloudflare fails for a SvelteKit app whose Worker imports a .wasm module (e.g. @resvg/resvg-wasm). vp build passes; the failure is in "Preparing deployment", before u... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Pleasurecruise |
| hostname | github.com |
| expected-hostname | github.com |
| None | 03e5090f0cea887cafa036e3af34d7c668d83b5e9e9e03df72a90efb49b69cdf |
| turbo-cache-control | no-preview |
| go-import | github.com/voidzero-dev/void git https://github.com/voidzero-dev/void.git |
| octolytics-dimension-user_id | 149750581 |
| octolytics-dimension-user_login | voidzero-dev |
| octolytics-dimension-repository_id | 1164437080 |
| octolytics-dimension-repository_nwo | voidzero-dev/void |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1164437080 |
| octolytics-dimension-repository_network_root_nwo | voidzero-dev/void |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 41f00295b9a35dca977890ab83b22788ab211dc8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width