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
fortransformIndexHtml
(deprecated in v4.0.0)- It was changed to align the interface with Rollup's object hooks.
order
should be used instead ofenforce
, andhandler
should be used instead oftransform
.
Advanced
There are other breaking changes which only affect few users.
- [#19979] chore: declare version range for peer dependencies
- Specified the peer dependencies version range for CSS preprocessors.
- [#20013] refactor: remove no-op
legacy.proxySsrExternalModules
legacy.proxySsrExternalModules
property had no effect since Vite 6. It is now removed.
- [#19985] refactor!: remove deprecated no-op type only properties
- The following unused properties are now removed:
ModuleRunnerOptions.root
,ViteDevServer._importGlobMap
,ResolvePluginOptions.isFromTsImporter
,ResolvePluginOptions.getDepsOptimizer
,ResolvePluginOptions.shouldExternalize
,ResolvePluginOptions.ssrConfig
- The following unused properties are now removed:
- [#19986] refactor: remove deprecated env api properties
- These properties were deprecated from the beginning. It is now removed.
- [#19987] refactor!: remove deprecated
HotBroadcaster
related types- These types were introduced as part of the now-deprecated Runtime API. It is now removed:
HMRBroadcaster
,HMRBroadcasterClient
,ServerHMRChannel
,HMRChannel
- These types were introduced as part of the now-deprecated Runtime API. It is now removed:
- [#20045] fix: treat all
optimizeDeps.entries
values as globsoptimizeDeps.entries
now does not receive literal string paths. Instead, it always receives globs.
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.