Skip to content

fix: support .wasm imports during dev and build (backport) - #17824

Merged
teemingc merged 14 commits into
adapter-cloudflare-8from
teemingc/adapter-cloudflare-8-wasm
Nov 24, 2026
Merged

teemingc merged 14 commits into
adapter-cloudflare-8from
teemingc/adapter-cloudflare-8-wasm

Conversation

@teemingc

@teemingc teemingc commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Backport of #17823 to 8.x, based on the 8.0.3 release. Fixes #17826 on the 8.x line.

A dependency that imports a .wasm file under its workerd condition works in vite dev and vite build again. Importing a .wasm file from the app's own code, which never worked, now works too, including .wasm?init, and the Worker that Wrangler bundles still imports the .wasm file directly.


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

@pkg-svelte-dev

pkg-svelte-dev Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from cc5248f:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/cc5248f4eadb815787dd670186716343939e8981

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/17824

@changeset-bot

changeset-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cc5248f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-cloudflare Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@svelte-docs-bot

Copy link
Copy Markdown

@teemingc teemingc changed the title fix: support .wasm imports during dev and build fix: support .wasm imports during dev and build (backport) Nov 20, 2026
Comment thread packages/adapter-cloudflare/config.js Resolved
Comment thread packages/adapter-cloudflare/index.js Resolved
@vercel-internal-security-reviewer

Copy link
Copy Markdown

Security review details

@teemingc
teemingc marked this pull request as draft November 23, 2026 20:11
@teemingc
teemingc force-pushed the teemingc/adapter-cloudflare-8-wasm branch from ed3eb0a to 28ca2f6 Compare November 23, 2026 20:11
@teemingc
teemingc marked this pull request as ready for review November 24, 2026 00:14
@teemingc
teemingc merged commit 05b6fb1 into adapter-cloudflare-8 Nov 24, 2026
36 checks passed
@teemingc
teemingc deleted the teemingc/adapter-cloudflare-8-wasm branch November 24, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.wasm imports in dependencies fail since @sveltejs/[email protected]

2 participants