Vite 8, in Eight Lines of Config

vitefrontenddevopsupgrades

The Vite 8 migration guide opens with a list that reads like a demolition notice. Rolldown replaces Rollup. Oxc replaces esbuild. Lightning CSS replaces esbuild for CSS. CommonJS interop tightens…
So I cleared an afternoon, put on coffee, and opened one of the monorepos maintained expecting to spend most of the day inside vite.config.* files - all in response to the upgrade Renovate suggested.

With some AI prompts for searches through the Internet, the diff ended up being eight lines across three of those files. Yes: all builds green; all tests green. The admin SPA got 80% faster in the Vite step alone.

Why the changelog scares people

The scary part of a major Vite release is not dishonest. The toolchain really did get swapped - Rolldown (a Rust-based Rollup rewrite) for Rollup, Oxc (another Rust toolchain) for esbuild’s JS side, Lightning CSS (also Rust) for esbuild’s CSS side. A project that leans hard on a custom manualChunks function, a tuned esbuild.loader block, or hand-written Rollup plugins has real work ahead. The migration guide is written for that project, because that’s the project where the upgrade can go wrong.

What the migration guide cannot tell you is the ratio. What fraction of the config surface does an average Vite project actually touch? For our case the answer is: almost none.

The stack

Our stack is a production Nx 22.6.5 monorepo for an e-commerce project, running on a dedicated VPC environment. Three Vite-built targets:

  • apps/public - a React Router v7 SSR storefront with Tailwind CSS 4 and shadcn/ui.
  • apps/admin - a Vite + React 19 SPA, feature-rich internal tooling, and the heaviest build in the repo by a wide margin.
  • libs/ui - a shared component library built in Vite’s lib mode.

Tests run through Jest with jsdom as the DOM emulator. Node 24, npm 11.6.2, strict peer-deps mode.

Three packages had to move in the same commit because @vitejs/plugin-react@6 has a hard peer dep on Vite 8, and the Jest + jsdom environment has to keep up:

vite                 ^7.0.0  → ^8.0.8
@vitejs/plugin-react ^5.1.4  → ^6.0.1
jsdom                ~28.1.0 → ~29.0.2

Nothing else changed.

The eight lines

  • apps/public/vite.config.mts - untouched. The React Router plugin, the Tailwind plugin, nxViteTsPaths, and a small ssr.noExternal regex for embla-carousel. Nothing to migrate.
  • apps/admin/vite.config.mts - deleted a build.commonjsOptions: { transformMixedEsModules: true } block (three lines) that is now a no-op in Vite 8.
  • libs/ui/vite.config.mts - deleted the same commonjsOptions block (three lines) and renamed build.rollupOptions: { external: [...] } to build.rolldownOptions (one line).

Seven lines of deletion, one line of rename. No runtime code touched. The repo has no vitest.config.* files (Jest handles the test side), so there was no test-runner migration to do either.

The 30-second grep

This is the practical payload of the whole post. If a vite.config.* has any of these lines in it, the upgrade is real work. If it has none of them, the upgrade is a coffee-break operation.

  • build.rollupOptions → rename to build.rolldownOptions. Mechanical.
  • build.commonjsOptions → now a no-op, safe to delete.
  • esbuild: config block → migrate to oxc:. Mechanical, a few lines.
  • optimizeDeps.esbuildOptions → rename to optimizeDeps.rolldownOptions. Vite auto-migrates, the explicit version is cleaner.
  • build.manualChunks object form → replaced by Rolldown’s codeSplitting option. This is the one item on the whole checklist that actually requires design thinking: a static manualChunks object ports mechanically, but a manualChunks function encodes imperative chunking logic that has to be rewritten into codeSplitting’s declarative shape.
  • build.cssMinify: 'esbuild' → still works, but esbuild now has to be an explicit devDependency. Lightning CSS is the new default.
  • build.minify: 'esbuild' → same pattern for JS minification.
  • Any import from a CJS-only dependency that was leaning on loose default-import interop → verify the built bundle in its production shape, not just in dev.

A project without any of those lines - no rollupOptions, no esbuild block, no manualChunks object, default minifier - is eight lines of mechanical work at worst.

Benchmarks

All numbers from time npx nx build <target> --skip-nx-cache on the same machine, same inputs, same build order, Node 24.

Build targetVite 7Vite 8Delta
public SSR (Vite time)611 ms393 ms−36 %
public SSR (total Nx)12.5 s12.9 s~unchanged
public SSR output size3.4 MB3.4 MBunchanged
admin SPA (Vite time)7.64 s1.54 s−80 %
admin SPA (total Nx)14.5 s7.3 s−50 %
admin SPA output size2.6 MB2.4 MB−8 %
libs/ui (Vite time)—2.93 s—
libs/ui output size548 KB464 KB−15 %

This table contains two interesting rows.

The admin SPA went from 7.64 s to 1.54 s in the Vite step alone. That is a heavy, component-rich build the team triggers many times a day, and a six-second saving on the inner loop is the kind of change a developer feels before they know where it came from. The total Nx wall-clock on that target roughly halved, from 14.5 s to 7.3 s.

The public SSR build shows a clean 36% Vite-time speedup, and the total Nx time barely moves. That target was already sub-second on Vite 7 because it is an SSR server bundle, not a client bundle, and most of the Nx wall-clock is Nx’s own orchestration overhead rather than the Vite step itself. The win is real, and it is not viscerally felt.

The 8–15% bundle size shrinkage is the Oxc minifier working on its own. No tree-shake tuning, no code changes, no chunking knobs touched - just a different minifier in the default pipeline.

The test surface

Lint:   9 / 9 projects  - 0 errors, 62 pre-existing warnings (unrelated)
Test:  18 / 18 suites   - 180 / 180 tests pass in 3.9 s
Build:  3 / 3 projects  - all green

The jsdom 29 rebuild of CSSOM is the part of the changelog that makes test environments nervous. It touched zero tests in this codebase. The test surface is only that narrow if the tests don’t lean on getComputedStyle or CSS-shorthand parsing. A codebase that snapshot-tests computed styles should budget real time for jsdom 29 on top of the Vite 8 work.

The lesson

The scariness of a major version bump is not a property of the release. It is a property of the intersection between the release and the project. The Vite 8 changelog is an honest inventory of every knob that moved; a given project touches a small, knowable subset of those knobs. The 30-second grep above is there so that the calibration can happen in a short meeting, not a sprint planning.

One honest caveat on the headline 80% number: the admin SPA is one target among several in the team’s day. The compounding is still real - a faster build that the team triggers repeatedly saves context switches across every developer who touches it, and those switches are where the cost of a slow inner loop actually lives - but the win is concentrated in one corner of the workflow, not spread evenly across everything.

The related lesson is about deferral. An upgrade with a single design decision (the manualChunks one, if it applies) and a 50% wall-clock win on the heaviest target is not an upgrade worth sitting on. It is an upgrade worth doing on a Friday afternoon with a coffee and the changelog open in a second tab.

The mirror case is worth naming too. A project with a custom manualChunks function, a tuned esbuild block, or in-house Rollup plugins sits in a different camp - that upgrade wants a scheduled slot, a staging canary, and time to re-verify bundle layouts. Deferring it until the design work can be fit into a sprint is the honest call there, and nothing in this post argues otherwise.


Running Vite 7 in production and trying to calibrate what a Vite 8 upgrade would actually cost on your own configs? Get in touch. Happy readings!