---
name: vite-8-rolldown-bundler
description: "Migrate projects to Vite 8 + Rolldown — rolldown-vite config, Oxc/Lightning CSS tuning, plugin conversion, speed checks. Production Vite 8 migration with Rolldown as the default Rust bundler: swap in rolldown-vite (or the native @vitejs/plugin-rolldown), reconcile Rollup plugin incompatibilities, and enable the Oxc transform pipeline plus Lightning CSS. Covers experimental.enableNativePlugin, build.rollupOptions mapping to Rolldown's option set, withFilter plugin hooks, optimizeDeps/full-bundle dev mode, advancedChunks chunk splitting, and resolving moduleSideEffects/treeshaking and CommonJS interop differences. Verifies build-time speedups against the prior esbuild/Rollup baseline."
license: MIT
---

# Vite 8 Rolldown Migrator

A guided migration assistant for moving existing Vite 5/6/7 projects onto **Vite 8 with Rolldown**, the Rust-based bundler that replaces the Rollup + esbuild duo for both dev and production builds. It targets teams who want the speed gains of Rolldown without manually untangling plugin incompatibilities, config drift, and CSS pipeline changes. Best suited for medium-to-large apps where build times have become painful.

## When to use it

- Your production build runs Rollup and you want to switch to the `rolldown-vite` package (or the native bundler path in Vite 8).
- You have a `vite.config.ts` with several `@rollup/plugin-*` entries and aren't sure which survive the move.
- CI build times or local cold starts have grown and you want Oxc-powered transforms and Lightning CSS minification.
- You're evaluating whether your dependency tree (especially Rollup-only plugins and `commonjs` interop) is Rolldown-ready before committing.

## What it does

The skill inspects your `package.json` and `vite.config.*`, then performs the migration in stages:

- Swaps `vite` for the `rolldown-vite` drop-in (aliased via `overrides`/`resolutions`) or wires up the native bundler depending on your Vite 8 channel.
- Audits `plugins: []`, flagging Rollup plugins with no Rolldown equivalent and rewriting `build.rollupOptions` (input/output/manualChunks) into the supported shape.
- Enables `experimental.enableNativePlugin` where your plugins are compatible, routing transforms through **Oxc** instead of Babel/esbuild.
- Switches CSS handling to **Lightning CSS** via `css.transformer: 'lightningcss'` and `build.cssMinify: 'lightningcss'`, reconciling PostCSS-only features.
- Runs a before/after `vite build` timing comparison and surfaces bundle-size deltas.

## Usage example

```bash
curl -fsSL --create-dirs -o ~/.claude/skills/vite-8-rolldown-bundler/SKILL.md https://claudeskil.com/skills/vite-8-rolldown-bundler/SKILL.md

# then, in your project:
claude "migrate this app to Vite 8 + Rolldown and report build-time deltas"
```

Resulting config sketch:

```ts
// vite.config.ts
import { defineConfig } from 'vite'
export default defineConfig({
  experimental: { enableNativePlugin: true },
  css: { transformer: 'lightningcss' },
  build: {
    cssMinify: 'lightningcss',
    rollupOptions: { output: { manualChunks: { vendor: ['react', 'react-dom'] } } },
  },
})
```

## Tips & gotchas

- `rolldown-vite` is a package alias — pin it through `overrides` (npm/pnpm) or `resolutions` (yarn) so transitive deps don't pull plain `vite`.
- Lightning CSS does not run your PostCSS plugin chain; if you rely on `postcss-nesting` or custom plugins, keep the PostCSS transformer for those files.
- `manualChunks` as a function still works, but advanced Rollup output hooks may behave differently under Rolldown — verify chunk graphs after migrating.
- Oxc is stricter about certain decorator/legacy syntax than Babel; expect to adjust `tsconfig` targets.

## FAQ

**Is rolldown-vite production-ready?** It's the supported way to try Rolldown today and is API-compatible with Vite's config; treat the build output as you would any major-version bump and run your full test suite.

**Will my Rollup plugins keep working?** Many do via the compatibility layer, but native-plugin mode only accepts Rolldown-aware plugins. The skill lists which of yours need replacing.

**Can I roll back?** Yes — removing the alias and reverting the config restores standard Vite.
