Skip to content

chore: upgrade to Vite 8 and Vitest 4.1#511

Draft
james-elicx wants to merge 2 commits intomainfrom
chore/vite8-vitest4
Draft

chore: upgrade to Vite 8 and Vitest 4.1#511
james-elicx wants to merge 2 commits intomainfrom
chore/vite8-vitest4

Conversation

@james-elicx
Copy link
Collaborator

Summary

  • Bumps vite from ^7.x to ^8.0.0 across all 23 workspace packages (root, packages/vinext, all fixtures, all examples, benchmarks)
  • Bumps vitest from ^3.2.1 to ^4.1.0
  • Removes pnpm.overrides.rollup (Vite 8 ships rolldown internally)

Breaking-change migrations applied

Vite 8

  • rollupOptionsrolldownOptions: Renamed in packages/vinext/src/index.ts (5 occurrences across global config + rsc/ssr/client environments) and packages/vinext/src/cli.ts (2 occurrences). The onwarn fallback checks both names to stay compatible with user-supplied configs.
  • esbuildoxc: Removed the viteMajorVersion >= 8 branch; always uses oxc now.
  • resolve.tsconfigPaths: Removed the dead vite-tsconfig-paths plugin branch; uses Vite's native resolve.tsconfigPaths unconditionally.
  • Removed the now-unused getViteMajorVersion() helper and vite-tsconfig-paths import.

Vitest 4

  • No changes needed — the existing vitest.config.ts had no deprecated options.

Peer dependency warnings

@cloudflare/vite-plugin, @vitejs/plugin-rsc, @vitejs/plugin-react, vitefu, and @tailwindcss/vite still declare Vite 6/7 in their peer ranges. These are pre-existing and expected; the packages work correctly with Vite 8.

- Bump vite from ^7.3.1 to ^8.0.0 across all packages, fixtures, and examples
- Bump vitest from ^3.2.1 to ^4.1.0
- Rename build.rollupOptions → build.rolldownOptions in index.ts and cli.ts (Vite 8 breaking change)
- Update onwarn fallback to check both rolldownOptions and rollupOptions for backwards compat with user configs
- Remove Vite 7 esbuild/tsconfigPaths compatibility branches (now always use oxc + native tsconfigPaths)
- Remove dead getViteMajorVersion() function and tsconfigPaths import
- Remove pnpm.overrides.rollup (Vite 8 ships rolldown, not rollup)
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 12, 2026

Open in StackBlitz

npm i https://pkg.pr.new/vinext@511

commit: 906abb7

@github-actions
Copy link

Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original

@hyoban
Copy link
Contributor

hyoban commented Mar 13, 2026

Do we need to upgrade vite-plugin-react to 6.0? It doesn't support Vite 7. Maybe we should add it as a peer dependency? Let the user choose the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants