Skip to content

Conversation

@sapphi-red
Copy link
Contributor

Fixes this ecosystem-ci failure with Vite 7.2 beta:
https://github.com/vitejs/vite-ecosystem-ci/actions/runs/18900807449/job/53947420605#step:7:695

A new invoke method was added by vitejs/vite#21029, but that was blocked by this code

assert(
invokePayloadData.name === "fetchModule",
`Invalid invoke event: ${invokePayloadData.name}`
);

This PR removes that assertion as I don't think there's a reason to block other methods. Also this PR moves the custom logic to the environment side which feels less hacky to me (I'll revert this part if preferred).

ecosystem-ci run with this branch (passed ✅): https://github.com/vitejs/vite-ecosystem-ci/actions/runs/18904416204/job/53959123391


  • Tests
    • Tests included
    • Tests not necessary because: It will be covered when upgrading Vite to 7.2
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal bug fix
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: actually, not sure

@sapphi-red sapphi-red requested a review from a team October 29, 2025 10:41
@sapphi-red sapphi-red requested a review from a team as a code owner October 29, 2025 10:41
@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2025

🦋 Changeset detected

Latest commit: 78a5394

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

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 30, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@11123

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@11123

miniflare

npm i https://pkg.pr.new/miniflare@11123

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@11123

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@11123

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@11123

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@11123

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@11123

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@11123

wrangler

npm i https://pkg.pr.new/wrangler@11123

commit: 78a5394

Copy link
Contributor

@jamesopstad jamesopstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great and much cleaner. Thanks for the PR!

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Oct 30, 2025
@jamesopstad jamesopstad merged commit 9c5601a into cloudflare:main Oct 31, 2025
62 of 69 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Oct 31, 2025
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes an open-source contribution, big or small label Oct 31, 2025
@holopin-bot
Copy link

holopin-bot bot commented Oct 31, 2025

Congratulations @sapphi-red, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cmheytdlw009wl104k2844jef

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

@sapphi-red sapphi-red deleted the fix/vite-plugin-cloudflare-allow-invoke-other-than-fetchmodule branch November 4, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution [Holopin] Recognizes an open-source contribution, big or small

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants