Vite 6 is the release that completes Vite's evolution from a dev server into a full build platform. Two changes define this release: the Environment API for multi-target builds, and the experimental Rolldown integration that previews what Vite 7 will look like.
The Environment API
Before Vite 6, handling multiple build targets (client JS, SSR Node bundle, service worker) required separate Vite configs or complex plugins. The Environment API unifies them:
This is opt-in and may have edge cases. Rolldown is expected to become the default in Vite 7.
vite build --app
A new --app flag for framework-agnostic HTML-first builds - no framework adapter needed for simple multi-page apps:
vite build --app
This discovers all HTML entry points automatically and builds them together with shared chunk splitting.
CSS Source Maps Improvements
Vite 6 generates accurate CSS source maps for PostCSS transforms and CSS modules. Previously, source maps for CSS would point to intermediate files - now they trace back to the original source line.
export default defineConfig({
css: {
devSourcemap: true, // accurate in v6
},
});
Deprecation: CJS Node API
Vite 6 deprecates the CommonJS Node.js API (require("vite")). The ESM API is now the only supported interface. Update your config if you use createServer or build programmatically:
// Before (CJS)
const { createServer } = require("vite");
// After (ESM)
import { createServer } from "vite";
Migrating From Vite 5
pnpm add -D vite@6
Breaking changes to check:
Node.js minimum is now 18.0.0
define values are no longer stringified by default for non-string primitives - use JSON.stringify explicitly
Some plugin hook signatures changed for the Environment API - check your plugins against the migration guide
Practical deep-dives on LLMs, developer tools, and AI engineering. No filler. Unsubscribe any time.
// written byFIG. AUTH-01
530
Mahmudul Haque Qudrati
CEO & ML Engineer
CEO and ML Engineer at Pristren. Builds AI-powered software for teams and writes about machine learning, LLMs, developer tools, and practical AI applications.
Open Code Review – An AI-powered code review CLI tool: A Practical Overview
Open Code Review is an open-source CLI tool from Alibaba that uses AI to review code changes. It runs locally, supports multiple LLMs, and costs about $0.01 per review. Here's a practical breakdown.