Skip to content

Update Vite to version 8#1651

Merged
kmcginnes merged 1 commit intoaws:mainfrom
kmcginnes:vite-8
Apr 9, 2026
Merged

Update Vite to version 8#1651
kmcginnes merged 1 commit intoaws:mainfrom
kmcginnes:vite-8

Conversation

@kmcginnes
Copy link
Copy Markdown
Collaborator

Description

Migrate from Vite 7 to Vite 8, which replaces esbuild + Rollup with Rolldown + Oxc for bundling, transforms, and minification.

Dependency changes

  • vite ^7.3.1^8.0.0
  • @vitejs/plugin-react ^5.1.4^6.0.0 (drops built-in Babel)
  • @tailwindcss/vite ^4.2.1^4.2.2 (Vite 8 peer dep)
  • babel-plugin-react-compiler 19.1.0-rc.3^1.0.0 (stable release)
  • vitest / @vitest/coverage-v8 4.0.184.1.2 (Vite 8 peer dep)
  • Add @rolldown/plugin-babel 0.2.2 (React Compiler now requires a separate Babel plugin)
  • Remove vite-tsconfig-paths (Vite 8 supports tsconfig paths natively)

Config changes

  • Replace vite-tsconfig-paths plugin with resolve: { tsconfigPaths: true }
  • Move React Compiler to separate @rolldown/plugin-babel with reactCompilerPreset(), since @vitejs/plugin-react v6 removed built-in Babel support
  • Remove unnecessary /// <reference types="vitest" /> directive

Build comparison

Metric Vite 7 Vite 8 Change
Build time (vite) 12.73s 5.07s -60%
JS chunks 2 3 Better splitting
Total JS (gzip) 970 KB 922 KB -5.0%
CSS (gzip) 12.8 KB 12.8 KB ~unchanged

Note: The build emits a timing warning for @rolldown/plugin-babel since the React Compiler does non-trivial transforms. This is expected.

Migration guide

https://vite.dev/guide/migration

Validation

  • All 1562 tests pass across 145 test files
  • No type errors, lint errors, or format issues
  • Production build succeeds with smaller output
  • Audited every item in the Vite 8 migration guide against this codebase

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.56%. Comparing base (c5affc5) to head (68b6428).
⚠️ Report is 123 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1651       +/-   ##
===========================================
+ Coverage   47.81%   72.56%   +24.75%     
===========================================
  Files         382      408       +26     
  Lines        8525    12265     +3740     
  Branches     3159     3518      +359     
===========================================
+ Hits         4076     8900     +4824     
+ Misses       3070     2345      -725     
+ Partials     1379     1020      -359     
Flag Coverage Δ
unittests 72.56% <ø> (+24.75%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Migrate from Vite 7 to Vite 8, which replaces esbuild + Rollup with
Rolldown + Oxc for bundling, transforms, and minification.

Dependency changes:
- vite 7.3.1 → 8.0.8
- @vitejs/plugin-react 5.1.4 → 6.0.1
- @tailwindcss/vite 4.2.1 → 4.2.2
- babel-plugin-react-compiler 19.1.0-rc.3 → 1.0.0
- vitest / @vitest/coverage-v8 4.0.18 → 4.1.4
- Add @rolldown/plugin-babel 0.2.2
- Remove vite-tsconfig-paths (now built-in)

Config changes:
- Replace vite-tsconfig-paths plugin with resolve.tsconfigPaths: true
- Move React Compiler to separate @rolldown/plugin-babel plugin with
  reactCompilerPreset, since @vitejs/plugin-react v6 removed built-in
  Babel support
- Remove unnecessary /// <reference types="vitest" /> directive

Resolves aws#1647
@kmcginnes kmcginnes marked this pull request as ready for review April 9, 2026 16:35
@kmcginnes kmcginnes merged commit f72b9b1 into aws:main Apr 9, 2026
5 checks passed
@kmcginnes kmcginnes deleted the vite-8 branch April 9, 2026 17:00
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.

Update Vite to version 8

2 participants