This range is a broad Vite update spanning late v7, the v8 major, and backports into v6.4.x. The visible work centers on dev-server ergonomics, SSR and optimizer correctness, create-vite template updates, and a few security and edge-case fixes.
What's new
-
Vite now supports
vite:client-connectandvite:client-disconnectevents, which lets tools track the dev client lifecycle directly. This is aimed at cases like full bundle mode HMR and integrations migrating toenvironment.hot, where knowing when clients attach or detach matters. (#20978) -
The dev server can forward browser console output and unhandled runtime errors to the terminal with
server.forwardConsole. You can enable it astruefor error and warning forwarding, or use the object form to controlunhandledErrorsandlogLevels; it also turns on by default under supported coding-agent environments. (#20916) -
.wasm?initnow works in SSR as well as the browser. Server-side consumers get helper code that loads WebAssembly in an SSR-friendly way instead of relying on relativefetch, which previously led to failures likeERR_INVALID_URLin SSR and Vitest setups. (#21102) -
Vite can now serve over HTTP/2 even when
server.proxyis enabled. That removes a long-standing limitation where using proxying with HTTPS forced a downgrade away from HTTP/2. (#20869) -
Dependency optimization gives clearer feedback when it is slow. If scanning or bundling takes more than one second, Vite logs progress lines such as
[optimizer] scanning dependencies..., so large apps no longer look stuck after the initial “ready” message. (#21797) -
Manifest generation now includes an
assetsfield for standalone CSS entry points. That fills in data backend integrations need to emit preload and stylesheet links even when a CSS entry is not pulled in through a JavaScript entry. (#21015) -
Library mode with Terser now keeps pure annotations for ES output while still minifying. This avoids having to disable Terser entirely just to preserve tree-shaking hints. (#20522)
-
create-viteadds an “install and start now” flow. You can use-i, --immediateto install dependencies and start the dev server right after scaffolding, and choose a package manager interactively or via flags like--agent npm. (#20468) -
create-vitealso refreshes the starter experience: template branding was updated for the new theme, TypeScript templates now include Node typings andtypescompiler options, React templates support React Compiler, and the CLI shows clearer links and descriptions for Vite-based framework variants. (#21425, #21403, #18642, #20132, #20704) -
Vite now accepts a resolved config when calling
createServer, which helps tooling that needs to reuse an already-resolved configuration object instead of resolving it again. (#20932) -
URL detection from HTTPS certificates now supports multiple certificates instead of only one. That makes automatic server URL hostname resolution work with TLS setups that provide certificate arrays. (#20707)
Fixes
-
Fixed AMD bundle output so relative imports are resolved relative to the current module instead of
document.baseURI, which broke plugin-style AMD deployments loaded by RequireJS. (#20861) -
Fixed optimized dependencies that use
new URL('./worker.js', import.meta.url)so relative worker and asset paths still point at the correct files after bundling into.vite/deps. (#21434) -
Fixed a dev-server regression where document requests could return JavaScript source files instead of
index.htmlwhen the URL matched a project filename. (#20866) -
Fixed alias resolution in dev mode for aliases that start with URL-like patterns such as
//, bringing behavior back in line withvite build. (#20760) -
Fixed imports being rewritten by stripping the configured base from file-path-like imports, which could corrupt absolute filesystem imports. (#21221)
-
Fixed
.envloading for mounted FIFO files, so secrets streamed through named pipes can be read without requiring a regular file on disk. (#21365) -
Fixed worker builds where
prepareOutDirPlugincould remove output directories during worker bundling and leave files missing. (#20556) -
Fixed SSR builds with
emitAssets: truewhensharedConfigBuild: trueis also enabled. (#20787) -
Fixed
ModuleRunnerImportMetatyping conflicts when projects useskipLibCheck: falsealongside libraries that augmentImportMeta, such as@types/node, Expo, or React Native. (#21710) -
Fixed non-ASCII characters in base64 sourcemaps in the module runner, which previously decoded incorrectly. (#21985)
-
Fixed non-interactive stdin handling so the server drains stdin properly instead of waiting forever for
end. (#20837) -
Fixed create-vite dependency installation issues in the scaffolding flow. (#20826)
Other notable changes
resolve.alias.customResolveris now deprecated. The recommended replacement is a plugin with aresolveIdhook. (#21476)- Vite warns when
envPrefixcontains only spaces, treating that configuration as effectively empty. (#21292) - esbuild was updated to
^0.27.0. (#21183) - Vite replaced
debugwithobuginternally for modern ESM and typed debugging support. (#21107) - Experimental Vite DevTools integration landed in core. (#21331)
- A highly experimental full bundle mode was added for ongoing development work, but it is not expected to be used yet. (#21235)
- Security-related fixes include applying
fs.strictchecks to HTML files and upgradingsirvto 3.0.2. (#20736, #20735)
Contributors
@TheAlexLichter, @dschmidt, @upsuper, @brillout, @sapphi-red, @WhiteKiwi, @Copilot, @hi-ogawa, @HunterLarco, @BLUE-YBZ, @gameroman, @webfansplz, @Corvince, @guyco3, @btea, @smeng9, @sxzz, @adamkoppede, @YevheniiKotyrlo, @o-m12a, @sidharth-sudhir, @dependabot[bot], @sheremet-va, @monam2, @ArnaudBarre, @nicolo-ribaudo, @illusionaries, @thatguystone
Only a subset of merged work was included here.