latentstack
Blog
Tech stackBy Suraj4 min read

Vite 8 is out: what's new with Rolldown and how to upgrade from Vite 7

Vite 8 replaces esbuild and Rollup with Rolldown, one Rust-based bundler, for much faster builds. What changed, the breaking changes that affect real projects (rolldownOptions, manualChunks, CommonJS interop, Lightning CSS) and a safe upgrade path.

Vite 8 is out: what's new with Rolldown and how to upgrade from Vite 7

Quick answer: Vite 8 replaces its two bundlers (esbuild for development and Rollup for production) with a single Rust-based bundler, Rolldown. Builds can be up to 10–30× faster while most plugins keep working. Upgrade with npm install vite@8, rename rollupOptions to rolldownOptions, and check manualChunks and CommonJS imports. Large projects can upgrade gradually through rolldown-vite first.

Why Vite had two bundlers, and why that's over

Until now, Vite used esbuild to transform and pre-bundle dependencies during development, and Rollup to bundle for production. That combination was fast enough, but it meant two different tools with slightly different behaviour: code could work in dev and break in the build.

Rolldown is a bundler written in Rust, designed to be compatible with Rollup's plugin API while running at native speed. Vite 8 uses it for everything, which brings:

  • Much faster production builds: the Vite team reports up to 10–30× improvements, with the biggest gains on large projects.
  • One consistent pipeline for dev and build, so fewer "works in dev, fails in prod" surprises.
  • Plugin compatibility: the configuration API and plugin hooks stay the same, and a compatibility layer converts most existing esbuild and Rollup options automatically.

Two ways to upgrade

Option A: upgrade directly (small and medium projects)

npm install -D vite@8
npx vite build

Then fix any warnings or errors using the breaking-change list below.

Option B: upgrade gradually (large or complex projects)

Stay on Vite 7 but swap in the Rolldown-powered package first:

package.json
{
  "devDependencies": {
    "vite": "npm:rolldown-vite@latest"
  }
}

This isolates Rolldown-specific issues before you take the rest of the Vite 8 changes. Once your build is clean, move to vite@8.

Breaking changes that affect real projects

rollupOptions becomes rolldownOptions

vite.config.ts
export default defineConfig({
  build: {
    // before: rollupOptions
    rolldownOptions: {
      output: { /* ... */ },
    },
  },
});

build.rollupOptions and worker.rollupOptions are deprecated in favour of rolldownOptions, and optimizeDeps.esbuildOptions is deprecated in favour of optimizeDeps.rolldownOptions.

manualChunks: object form removed

The object form of manualChunks is removed and the function form is deprecated. If your config looks like this, it needs changing:

// No longer supported in Vite 8
manualChunks: { react: ["react", "react-dom"] }

The simplest fix is often to remove manualChunks and let Rolldown's default chunking work, then measure. If you need custom splitting, use Rolldown's advanced chunking options described in the migration guide.

CommonJS interop is stricter

The way Vite handles importing CommonJS modules changed, which can break code that relied on the old behaviour (for example default imports from CJS packages). If you see undefined imports or default is not a function errors after upgrading, check those imports first.

CSS minification uses Lightning CSS

Lightning CSS is now the default CSS minifier. Output is usually smaller, but double-check any CSS that depended on quirks of the previous minifier.

Other removals

  • build.rollupOptions.watch.chokidar is removed in favour of Rolldown's watcher option.
  • build() now throws a BundleError that wraps individual errors, so update any code that inspects build errors.
  • The system and amd output formats are no longer supported.
  • Plugin hooks shouldTransformCachedModule, resolveImportMeta and renderDynamicImport are no longer supported.

Nice side effects

  • Native tsconfig path resolution: many projects can drop the vite-tsconfig-paths plugin. Test before removing it.
  • Fewer config differences between dev and build.

Upgrade checklist

  • Upgrade vite (directly or via rolldown-vite first)
  • Rename rollupOptions → rolldownOptions (build and worker)
  • Replace optimizeDeps.esbuildOptions with optimizeDeps.rolldownOptions
  • Remove or rewrite object-form manualChunks
  • Test CommonJS default imports
  • Check CSS output after the Lightning CSS switch
  • Update framework plugins (React, Vue, Svelte) and Vitest to versions that support Vite 8
  • Compare build time and bundle size with your Vite 7 baseline

Frequently asked questions

What is new in Vite 8?

Vite 8 replaces esbuild and Rollup with Rolldown, a single Rust-based bundler, for much faster builds and consistent behaviour between development and production, while keeping the configuration API and plugin hooks.

What is Rolldown?

Rolldown is a JavaScript bundler written in Rust that is compatible with Rollup's plugin API. Vite 8 uses it for both development and production builds.

How much faster is Vite 8?

The Vite team reports production builds up to 10–30 times faster, depending on the project. Larger projects tend to see the biggest gains.

How do I upgrade from Vite 7 to Vite 8?

Install vite@8, rename rollupOptions to rolldownOptions, replace optimizeDeps.esbuildOptions, remove object-form manualChunks and test CommonJS imports. Large projects can first switch to the rolldown-vite package on Vite 7.

Can I keep using Rollup in Vite 8?

No. There is no configuration flag to switch Vite 8's production build back to Rollup. If you need more time, stay on Vite 7 until your project is ready.

Do Vite plugins still work in Vite 8?

Most do. Vite 8 keeps the plugin hooks and includes a compatibility layer, but a few hooks are no longer supported, so update framework plugins to versions that declare Vite 8 support.

Sources

Found this useful?

Leave a like, share it with someone who's building with AI, or tell me what you think below.

Comments

Comments

Comments are public. Be kind. See the privacy policy.

    Get the next noteComing soon

    One short email when a new post lands. No spam.