Skip to content

Migration from v6

Node.js Support

Vite no longer supports Node.js 18, which reached its EOL. Node.js 20.19+ / 22.12+ is now required.

Default Browser Target change

The default browser value of build.target is updated to a newer browser.

  • Chrome 87 → 107
  • Edge 88 → 107
  • Firefox 78 → 104
  • Safari 14.0 → 16.0

These browser versions align with Baseline Widely Available feature sets as of 2025-05-01. In other words, they were all released before 2022-11-01.

In Vite 5, the default target was named 'modules', but this is no longer available. Instead, a new default target 'baseline-widely-available' is introduced.

General Changes

Removed Sass legacy API support

As planned, support for the Sass legacy API is removed. Vite now only supports the modern API. You can remove the css.preprocessorOptions.sass.api / css.preprocessorOptions.scss.api option.

Removed deprecated features

  • splitVendorChunkPlugin (deprecated in v5.2.7)
    • This plugin was originally provided to ease migration to Vite v2.9.
    • The build.rollupOptions.output.manualChunks option can be used to control the chunking behavior if needed.
  • Hook-level enforce / transform for transformIndexHtml (deprecated in v4.0.0)
    • It was changed to align the interface with Rollup's object hooks.
    • order should be used instead of enforce, and handler should be used instead of transform.

Advanced

There are other breaking changes which only affect few users.

Migration from v5

Check the Migration from v5 Guide in the Vite v6 docs first to see the needed changes to port your app to Vite 6, and then proceed with the changes on this page.

Released under the MIT License. (4e426c57)