Vite 6 is here with the most significant internal restructuring since Vite 2, introducing an Environment API that gives frameworks like Nuxt and SvelteKit finer-grained control over the build process.
The new Environment API allows frameworks to define multiple environments (client, SSR, edge) with independent module graphs and configurations:
// vite.config.js
export default {
environments: {
client: { /* browser config */ },
ssr: { /* node config */ },
edge: { /* edge runtime config */ },
}
}
All Vue projects using Vite benefit from these improvements. The Vite team recommends upgrading with a simple package update:
npm install vite@latest @vitejs/plugin-vue@latest
All Comments