npm / vite
vite
What changed in vite 6 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
46 breaking17 security10 deprecations11 new APIs and options6 performance14 behavior and defaults13 tooling169 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initvite 8245 changes
Breaking changes 40
CSS entrypoints are rejected when CSS code splitting is disabled.
SSR builds with
build.ssr: trueuse top-levelinput.Wasm files outside
server.fsare rejected.Input option unescaping is removed for now.
The deny list now includes additional common files, affecting which files can be served by the dev server.
A relative glob in a virtual module now errors when no files match.
The JS resolver no longer uses format-sniffing module resolution.
Sourcemaps can no longer reference files outside the package.
In workers, the result of require(json) is no longer wrapped.
The JavaScript API now throws a
BundleErrorinstead of the raw error thrown in the plugin; individual errors are available in.errors.Deprecated and now has no effect.
Lightning CSS is now the default CSS minifier; set the option to
'esbuild'to switch back, with esbuild installed as a devDependency.Deprecated and now has no effect.
The Oxc Minifier is now used for JavaScript minification by default; the deprecated
build.minify: 'esbuild'option can switch back if esbuild is installed.Replacement for
build.rollupOptions.Use this option to control minification behavior previously configured through
esbuild.minify*.Replacement for the removed
build.rollupOptions.watch.chokidaroption.The
systemandamdoutput formats are no longer supported.Removed; migrate to
build.rolldownOptions.watch.watcher.Passing the same browser with multiple versions now errors instead of selecting the latest version.
Assigning to
bundle[foo]is unsupported; usethis.emitFile()instead. Bundle references are not shared across hooks, andstructuredClone(bundle)is unsupported.Rolldown offers this more flexible option for manual code splitting in place of
output.manualChunks.CJS default import handling is consistent across development and build: certain importer and package conditions select
module.exports, otherwisemodule.exports.defaultis used.Object values passed to
defineno longer share a reference; each variable gets a separate copy.Passing a URL is no longer supported; pass an id instead.
In UMD and IIFE output,
import.meta.urlis no longer polyfilled and is replaced withundefinedby default.This deprecated option temporarily restores the previous CommonJS default import behavior.
Comments outside the documented set are moved; Rollup only removes comments when adjacent code is removed.
The object form is no longer supported and the function form is deprecated; Rolldown's
codeSplittingoption is the replacement.Hooks that were parallel in Rollup now run sequentially.
Transforming to ES5 and below with this plugin is not supported.
Comments are removed before this hook instead of after it.
This plugin hook is no longer supported.
Externalized module
requirecalls are preserved asrequirecalls instead of being converted toimportstatements.Module resolution no longer uses format sniffing when
browserandmodulefields coexist; Vite now respects this option's order.This plugin hook is no longer supported.
This plugin hook is no longer supported.
This plugin hook is no longer supported.
Support is partial.
Replacement for
worker.rollupOptions.
Security 15
The server escapes HTML attributes.
launch-editor: Editor CLI flag misinterpretation causing arbitrary command execution for some editors
launch-editor: escapeCmdArgs() omits % escaping on Windows
launch-editor:
fs.existsSync()existence check can be bypassed on WindowsThe server checks resolved ids for transform access.
Vite: Cross origin script execution through Vite custom middleware
Vite: First 4 bytes of files outside of
server.fssetting is exposed by?vite-wasm-instanceThe server checks fs.serve for requests using this query, ensuring the serving restriction is applied.
launch-editor: NTLMv2 hash disclosure via UNC path handling on Windows
vite:
server.fs.denybypass on Windows alternate pathsRequests to HMR patch files are rejected in non potentially trustworthy origins.
The server.fs check now applies to env transport, limiting access according to the configured filesystem restrictions.
Vite:
server.fs.denybypassed with queriesVite Vulnerable to Arbitrary File Read via Vite Dev Server WebSocket
Vite Vulnerable to Path Traversal in Optimized Deps
.mapHandling
Deprecations 10
Vite now warns when the deprecated
envFileis used.Deprecated; renamed to
build.rolldownOptions.The JavaScript transformation option is deprecated in favor of
oxc; existing settings are converted automatically.Deprecated in favor of
optimizeDeps.rolldownOptions; existing options are converted automatically.Oxc handles JavaScript transformation. The deprecated
esbuildoption remains supported through automatic conversion tooxc.Deprecated in favor of
parseSyncandparse, which have more features.Recommended replacement for the deprecated
parseAstandparseAstAsyncfunctions.Deprecated; use a custom plugin with the
resolveIdhook andenforce: 'pre'instead.Deprecated in favor of
transformWithOxc; install esbuild as a devDependency if a plugin still uses this function.Vite now warns when the vite-tsconfig-paths plugin is detected.
New APIs and options 6
Bundled dev supports import.meta.hot.acceptExports.
Adds input support to server.fs.allow.
The esbuild plugin converter passes some properties of the build result to onEnd, allowing plugins to access them there.
Re-exported from Vite for users who want to convert externalized
requirecalls toimportstatements.Dependency optimization uses Rolldown; this option replaces deprecated
optimizeDeps.esbuildOptions, which is converted automatically for backward compatibility.New transformation function recommended as a replacement for
transformWithEsbuild.
Performance 5
Sass is imported once instead of once per file, improving CSS processing performance.
On Windows,
net useis deferred until a UNC path is resolved.Avoids settling seen preload dependencies to improve build performance.
Pre-compiles context matchers at server creation to improve proxy performance.
Pure CSS chunks are looked up through a Set.
Behavior and default changes 8
Named imports from Node built-ins are allowed in bundled dev.
Bundled dev reloads once after a rebuild instead of using the fallback page.
Explicit hosts in network URLs resolve the interface name.
Legacy builds prefer oxc as the minifier.
Vite sends a 408 response when a request times out.
The list of files shown on HMR updates is truncated.
The default browser targets are updated to Chrome 111, Edge 111, Firefox 114, and Safari 16.4, aligning with Baseline Widely Available as of 2026-01-01.
Rolldown auto-detects module types from resolved-id extensions; plugins converting content to JavaScript in
loadortransformmay need to returnmoduleType: 'js'.
Tooling 11
The peer dependency range now includes v0.5.0, allowing projects using that version to satisfy the integration's peer requirement.
Config incompatibility locations now include the column.
Bundled dev supports worker file updates accepted by HMR.
The dynamic import warning now links to Vite documentation.
Bundled dev adds lazy bundling support.
Vite updates Rolldown to 1.0.0.
Vite logs when dependency scanning or bundling takes over one second.
Vite now allows esbuild 0.28.
Types are now provided for vite/modulepreload-polyfill.
Updated Rolldown to 1.0.0-rc.11.
Vite uses Rolldown and Oxc-based tools instead of esbuild and Rollup.
Fixes and other changes 150
Assets referenced by inline workers are emitted during load in bundled development mode.
Native loader compatibility checks are skipped for type-only imports.
The console window is hidden when this command runs on Windows.
The environment's
build.sourcemapsetting is respected.Bundled dev reloads when HMR cannot run an entry again.
Rendered modules are indexed once per output for
cssScopeTo.CSS dependency collection resolves dynamic imports with appended queries.
Adjacent module tags on the first line are removed.
Files referenced with a query or hash are watched when referenced through
new URL(..., import.meta.url).Overlapping plugin container close calls are awaited, so closing the container completes reliably.
Preload link listeners are removed when settled.
ANSI escape sequences are escaped when console output is forwarded by the dev server.
For
ssr.target=webworker, external requires of built-in modules are converted to imports.Static alias replacements preserve
$patterns.The optimizer resolves subpath imports using Vite's resolver.
Chunks conflicted with unused workers are kept when those workers are still used by a live worker.
The server strips the base only when the path matches a full segment.
Build handles missing chunk import maps and includes preload dependencies when hashing them.
Bundled dev ignores this build option.
CSS processing no longer fails when a
url()contains a literal%.The bundled-dev fallback page declares a UTF-8 charset.
Bundled dev maps forwarded error stacks through the bundle source maps.
Bundled dev stops HMR propagation at modules that are no longer imported.
Bundled dev includes user-defined
import.meta.env.*values in theimport.meta.envobject.Dependency optimization scans imports specified by
oxc.jsxInject.Bundled dev applies the configured origin to asset URLs.
The server handles socket errors on upgrade requests not taken by the HMR server.
Resolution supports subpath imports containing multiple
#characters.Dependency optimization falls back to
yarn.lockwhen calculating the lockfile hash.Skips rewriting adopted styles that have not changed.
Corrects preloads when chunkImportMap is enabled with a non-root base.
Skips caching CSS of chunks in a cycle.
The optimizer scans deep imports with custom extensions.
Normalizes the file before the root check in ensureWatchedFile.
HTML handling no longer adds the filesystem root to the watcher.
Vite no longer mutates HMR defaults.
Modules ending with a js-like query are no longer treated as JavaScript.
Resolves imported preprocessors from their file path when using lightningcss.
Waits for in-flight stylesheets in the preload helper.
A restart requested during another restart is no longer dropped.
Static aliases are matched on path boundaries.
Bundled dev serves /@vite/client.
Bundled dev stubs @vite/env.
The filename passed to transformIndexHtml no longer includes queries, so plugins receive the expected filename.
Browser:false mappings no longer produce unsupported warnings during dependency optimization.
The minify option is now merged correctly.
CSS is preloaded correctly when renderBuiltUrl returns URLs with queries.
The server handles file watcher errors without crashing.
Object and array printing is limited in size when using forwardConsole.
Bundled dev now serves sourcemaps for lazy chunks.
Whitespace is encoded in the SSR module runner sourceURL.
Excluded optional peer require fallbacks are now preserved by the optimizer.
Queries are now passed to renderBuiltUrl, allowing URL handling to account for query strings.
Bundled dev serves the rolldown runtime from the installed rolldown.
Percent-encoded srcset URLs are now resolved correctly.
Worker URLs are aligned between client and server when using terser.
The build configuration now merges build.rolldownOptions.output.comments correctly.
The optimizer no longer skips imports whose binding starts with type.
mergeConfig now handles server.ws: false correctly.
Source-map generation now skips URL source roots when injecting sources content.
Handles CRLF line endings when calculating code frame positions.
Treats only whole node_modules path segments as dependencies.
Lazy request errors are handled in bundled development mode.
Hot updates now propagate through circular imports instead of triggering a reload.
Escaped dots in define keys are matched correctly, supporting keys prefixed with $.
Root resolution now respects the preserveSymlinks setting.
Sourcemap paths are resolved against the sourcemap location.
SSR now rewrites computed keys of destructuring parameters.
False positives in Windows 8.3-short-name detection are reduced.
Client chunkImportMap now works with sharedPlugins: true.
Resolving the library entry from top-level input no longer mutates the user config.
The Lightning CSS visitor is no longer re-run during minification.
Setting port to 0 now causes the server to use a random port.
Shebangs ending with uncommon line terminators are now handled.
Build errors are printed to the terminal when an HMR update fails.
Preserves the environment snapshot during server restart.
Strips base during indexHtml module graph lookup.
Fixes resolving the top-level input option when plugins are used.
Keeps stack trace interception working when Object.prototype is frozen.
Fixes interop for imports injected into optimized dependency files by plugins.
Avoids calling buildEnd more than once in bundled development mode.
Respects the importer module format when handling dynamic import interop with CJS dependencies.
Aligns the client error overlay message format with rolldown.
Prevents stack-trace source mapping from crashing when globalThis.Buffer is absent.
Scopes switch-case declarations to the switch rather than the function in SSR.
When chunkImportMap is enabled, pure CSS chunk imports are stripped.
Vite keeps import.meta.url in the preload function unchanged.
Named export function call stacktrace columns are aligned with Node.
Inlined CSS is injected after the shebang line, preserving valid output for files that start with a shebang.
CSS is preloaded for nested dynamic imports.
Corrects the stack trace column position for the first line in SSR.
Bundled dev now serves assets emitted during HMR or lazy compilation.
Correctly inverts esbuild.jsxSideEffects when converting it to oxc.jsx.pure.
Preserves dollar signs in external @import URLs when using lightningcss.
Avoids a stack overflow when calling import.meta.hot.invalidate() in bundled dev.
The dependency optimizer scanner now resolves input from root.
The server's indexHtmlMiddleware now handles malformed URIs.
Some plugins that previously omitted the sourcemap field now return it.
Bundled dev skips plugin transform hooks for rolldown-lazy stub modules.
CSS and Sass @import resolution now supports tsconfig paths.
Errors are preserved when an incremental build fails in bundled-dev.
The HMR glob matcher now respects the
caseSensitiveoption.When
cspNonceis unset, Vite no longer adds a nonce to the import map.Glob resolution now skips null-valued exports when expanding glob IDs.
The middleware now handles malformed URIs.
launch-editor-middleware rejects UNC paths.
Windows alternate paths are rejected.
Fixes a cache key mismatch for HTML paths under /@fs/ in development.
Error messages are capitalized and a spurious space is removed from parse errors.
Provides onWarn for viteResolvePlugin in JavaScript plugin containers.
Oxc JSX options are passed to transformSync during dependency scanning.
Errors that occur when sending messages to the Vite server are now handled.
HTML transformation now handles paths with trailing slashes.
Synthetic assetFileNames calls keep the deprecated name and originalFileName fields.
Sass, Less, and Stylus worker disposal is awaited during teardown.
Legacy-only builds no longer include modulepreload links.
The public directory is copied after building the same environment with write=false.
SSR avoids rewriting labels that collide with imports.
Applies build.target to worker bundles.
create-vite passes the React framework to the TanStack CLI.
Forwards define to the worker bundle transform.
Prevents a partial-exports race when concurrent imports encounter in-flight invalidated re-export chains.
HMR matcher options are aligned with glob enumeration, so hot updates match the files enumerated by glob.
Warnings for
.css?inlinenow show the filename.HMR debug logs now look consistent with other HMR logs.
The user-configured
transform.targetcan override the default in dependency optimization.CSS entries use unique keys to prevent collisions between files with the same basename.
Vite detects the Deno workspace root.
emptyOutDir now takes effect for watch rebuilds.
Fallback sourcemap generation is skipped for ?raw imports.
Binding is allowed when strictPort is set but a wildcard port is in use.
Errors in the watchChange hook are handled in dev mode.
Avoids temporarily changing dns.getDefaultResultOrder.
Fixes class property key hoisting to match imports in SSR.
Vite now uses synchronous dns.getDefaultResultOrder instead of dns.promises to determine the default DNS result order.
Hoists the CJS interop assignment during dependency optimization.
Avoids mutating a Sass error multiple times.
Vite now resolves tsconfig paths that start with #.
Webworker SSR builds now use the browser platform.
Caches the unfiltered CSS list to prevent styles from going missing across entries.
Fixes optimizer scanning so it resolves subpath imports used in a glob import.
Skips re-importing when the runner is closed.
Handles non-ASCII characters in base64 sourcemaps.
Prevents rewriting the meta identifier inside import.meta when a binding named meta exists.
Fixes Lightning CSS minification when build.target is set to 'es6'.
Improves the error shown when a no-cors request is blocked.
Dependency optimization now handles
+symbols in package subpath exports.Uses more precise regular expressions for transform filters to avoid backtracking.
Worker output is now consistent with client and SSR output.
Messages refer to rolldownOptions instead of deprecated rollupOptions.
vite 719 changes
Breaking changes 1
UNC paths are rejected for launch-editor-middleware.
Security 1
vite allows server.fs.deny bypass via backslash on Windows
New APIs and options 3
Adds the ignoreOutdatedRequests option to optimizeDeps.
The module runner now exposes normalizeModuleId.
The module runner now exports ssrExportNameKey.
Behavior and default changes 1
Vite now keeps import.meta.url in bundled output.
Tooling 1
Vite now uses types from the terser package.
Fixes and other changes 12
IDs are escaped when resolving virtual modules.
Avoids lowering destructuring for newer Safari, preventing compatibility issues with that browser.
Fixes plugin shortcut support.
Merging behavior for external: true is fixed.
Shortcuts are rebound after the server restarts.
Shebangs in configuration files are now handled properly.
Multiple calls can now merge shortcuts instead of preventing additional shortcut bindings.
Fixes missing worker assets in the build.
Optional properties now include undefined for compatibility with exactOptionalPropertyTypes.
The module-runner getBuiltins response is now JSON serializable.
Vite falls back to sass when the sass-embedded platform binary is missing.
Trailing slashes are trimmed before checking server.fs.deny, correcting deny checks for paths with a trailing slash.
vite 622 changes
Breaking changes 5
Windows alternate paths are rejected.
The function now returns RunnableDevEnvironment instead of DevEnvironment, correcting its return type.
The function now returns a serverModule.
Inline workers are now emitted without base64.
Node 21 is no longer supported in version ranges.
Security 1
Checks server.fs after stripping the query from a request.
New APIs and options 2
createServer can now accept a resolved config.
Support is added for the .cur file type.
Performance 1
Bundle size is reduced for Object.keys and Object.values uses of import.meta.glob.
Behavior and default changes 5
The evaluator is now optional in the module runner.
HMR is enabled by default on the ModuleRunner side.
Config loading supports the module-sync condition when enabled.
The hook now runs after manually included dependencies are registered.
SSR output replaces __vite_ssr_identity__ with (0, ...) and injects semicolons between statements.
Tooling 1
Pre-transform error details are now displayed.
Fixes and other changes 7
Dependency changes made with npm, Yarn, or pnpm are now detected correctly.
Errors in the full reload handler are now caught.
The overlay now appears when multiple Vite clients are loaded.
Invalidation of inline proxy modules is fixed.
The previously missing InterceptorOptions type is now exposed.
Errors are now logged when sending in the module runner fails.
The exit code on SIGTERM is corrected.