Skip to content

chore: upgrade to Vite 8 (Rolldown + Oxc)#595

Merged
ElMassimo merged 1 commit intomainfrom
upgrade/vite-8
Mar 17, 2026
Merged

chore: upgrade to Vite 8 (Rolldown + Oxc)#595
ElMassimo merged 1 commit intomainfrom
upgrade/vite-8

Conversation

@ElMassimo
Copy link
Owner

Summary

  • Updates the default Vite version to ^8.0.0 in DEFAULT_VITE_VERSION
  • Vite 8 replaces Rollup/esbuild with Rolldown and Oxc — the existing rolldown detection logic (this.meta.rolldownVersion in index.ts) works correctly out of the box
  • Updates TypeScript to ^5.0.0 and switches moduleResolution from Node to Bundler (Vite 8 dropped the main field in favor of exports map, requiring modern TS module resolution)
  • Updates @types/node to ^22.0.0 and example deps (@vitejs/plugin-legacy ^8.0.0, @vitejs/plugin-vue ^6.0.0, sass ^1.70.0) to versions compatible with Vite 8
  • Updates build test snapshots for Rolldown-generated asset hashes
  • Fixes dev_server_proxy_test.rb: Rack::Builder#run now returns nil in Rack 3.2.5 (it previously returned the app as an unintended side effect), so the test now creates the capture lambda directly

Notes

  • Vite 8 requires Node >=20.19.0 or >=22.12.0 (tested with Node 22.22.1)
  • The peer dependency range for vite in both plugins remains >=5.0.0 to allow gradual adoption

Test plan

  • pnpm -C vite-plugin-ruby build — passes
  • pnpm -C vite-plugin-ruby test — 9 tests pass
  • pnpm -C vite-plugin-rails build — passes
  • pnpm -C vite-plugin-rails test — 2 tests pass (snapshot regenerated)
  • bundle exec rake test — 98 tests, 0 failures, 0 errors
  • vite-plugin-ruby/example build — passes
  • vite-plugin-rails/example build — passes

🤖 Generated with Claude Code

- Update DEFAULT_VITE_VERSION to ^8.0.0 in version.rb
- Update vite devDependency to ^8.0.0 in both plugin packages
- Update TypeScript to ^5.0.0 and @types/node to ^22.0.0 for Vite 8 compatibility
- Switch moduleResolution from Node to Bundler in tsconfig (Vite 8 dropped main field in favor of exports map)
- Update example packages: @vitejs/plugin-legacy to ^8.0.0, @vitejs/plugin-vue to ^6.0.0, sass to ^1.70.0
- Update build test snapshots and expected filenames for Rolldown-generated hashes
- Fix dev_server_proxy_test.rb to use lambda directly instead of Rack::Builder#run return value (Rack 3.2.5 changed this to return nil)
- Vite 8 requires Node >=20.19.0 or >=22.12.0 (tested with Node 22.22.1)
- Existing rolldown detection in index.ts (this.meta.rolldownVersion) works correctly with Vite 8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ElMassimo ElMassimo changed the title feat: upgrade to Vite 8 (Rolldown + Oxc) chore: upgrade to Vite 8 (Rolldown + Oxc) Mar 17, 2026
@ElMassimo ElMassimo merged commit 7e8dff2 into main Mar 17, 2026
6 of 30 checks passed
@ElMassimo ElMassimo deleted the upgrade/vite-8 branch March 17, 2026 13:21
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.

1 participant