Skip to content
Home / Migrations / Vite 5Vite 6

Vite 5 Vite 6

easy

Vite 6 is mostly backwards-compatible. The Environment API is opt-in. Main breaking change is dropping Node 16/17.

Estimated: 1-3h · 5 steps
Progress0%
Step 1: Update Node

Vite 6 requires Node 18, 20, or 22. Drop Node 16/17 from CI.

Step 2: Update Vite and plugins
npm install vite@6 @vitejs/plugin-react@latest
Step 3: Switch Sass to modern API

If using Sass, the default API changed to 'modern' in Vite 6.

css: { preprocessorOptions: { scss: { api: 'modern-compiler' } } }
Step 4: Audit ssrLoadModule usage

If you use ssrLoadModule directly, plan migration to the new Environment API. Most apps don't touch this.

Step 5: Run build
Production build succeeds. Dev server starts. No new warnings.

What this migration involves

Moving from Vite 5 to Vite 6 is rated easy and takes about 1-3h on a typical project. The guide breaks it into 5 steps, 2 of which ship with runnable commands and 1 with a verification check.

FAQ

How long does migrating from Vite 5 to Vite 6 take?

Around 1-3h for a typical project — 5 steps, difficulty rated easy, 2 of them with copy-paste commands.

Is moving from Vite 5 to Vite 6 reversible?

No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your Vite 5 data before you start.

What does Vite 6 cost compared to Vite 5?

Pricing for both tools is contact-based or not tracked yet.