Vite 6.0 has been released with a new Environment API, Node.js updates, and much more
Vite has released its 6.0 version, marking the most significant update since Vite 2. This version continues support for Node.js 18, 20, and 22+, while dropping support for Node.js 21. Vite's Node.js support aligns with the end-of-life schedule, with Node.js 18 reaching EOL in April 2025, potentially prompting a new major Vite release.
A key feature in Vite 6 is the introduction of the Environment API, aimed primarily at framework authors. This API enhances the development experience by aligning it more closely with production environments and facilitating the sharing of new building blocks within the ecosystem. Despite these changes, single-page applications and custom SSR apps maintain backward compatibility.
Additional updates in Vite 6 include a default value for resolve.conditions
, modifications to JSON stringify, enhanced asset reference support in HTML, and an update to postcss-load-config
from v4 to v6. Sass now defaults to a modern API, and there's an option to customize CSS output file names in library mode. These changes are expected to impact only a small number of users.
For most projects, upgrading to Vite 6 should be straightforward, but a review of the Migration Guide is recommended prior to updating.