Skip to content

Use Vite 8 for building the plugin and as the default for running tests#12936

Merged
jamesopstad merged 7 commits intomainfrom
james/vite-8-default
Mar 17, 2026
Merged

Use Vite 8 for building the plugin and as the default for running tests#12936
jamesopstad merged 7 commits intomainfrom
james/vite-8-default

Conversation

@jamesopstad
Copy link
Copy Markdown
Contributor

@jamesopstad jamesopstad commented Mar 17, 2026

Use Vite 8 for building the plugin and as the default for running tests.

The plugin now builds against Vite 8 and ships two bundled copies of vite/module-runner: one from Vite 8 and one from Vite 7.1.12 (the last version before a breaking change to the module runner in Vite 7.2.0). At dev server startup, the correct implementation is selected based on the user's installed Vite version. This is Vite 8's module runner for users on Vite >= 7.2.0, and the legacy module runner for users on older versions.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal change

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 17, 2026

🦋 Changeset detected

Latest commit: 72b1133

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

@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Mar 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 17, 2026

✅ All changesets look good

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 17, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 72b1133

@jamesopstad jamesopstad force-pushed the james/vite-8-default branch from 20d4c88 to ecb782b Compare March 17, 2026 09:45
@jamesopstad jamesopstad marked this pull request as ready for review March 17, 2026 11:17
@jamesopstad jamesopstad requested a review from a team as a code owner March 17, 2026 11:17
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Mar 17, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

LGTM except that this failure in CI (around Vitest pool workers) looks legit:

https://github.com/cloudflare/workers-sdk/actions/runs/23191556066/job/67388704527?pr=12936#step:8:2088

Comment thread pnpm-workspace.yaml
Comment thread packages/vite-plugin-cloudflare/e2e/fixtures/basic/package.json
Comment thread packages/vite-plugin-cloudflare/playground/partyserver/package.json
Comment thread packages/vite-plugin-cloudflare/src/plugins/nodejs-compat.ts
Comment thread packages/vite-plugin-cloudflare/tsdown.config.ts
@jamesopstad jamesopstad force-pushed the james/vite-8-default branch from bc5db1d to 72b1133 Compare March 17, 2026 14:06
@jamesopstad
Copy link
Copy Markdown
Contributor Author

LGTM except that this failure in CI (around Vitest pool workers) looks legit:

https://github.com/cloudflare/workers-sdk/actions/runs/23191556066/job/67388704527?pr=12936#step:8:2088

Thanks. Fixed the failing test in 72b1133 and added a comment explaining the behaviour change.

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 17, 2026
@jamesopstad jamesopstad merged commit cff91ff into main Mar 17, 2026
47 of 51 checks passed
@jamesopstad jamesopstad deleted the james/vite-8-default branch March 17, 2026 14:54
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants