apply property
Conditionally invoke a plugin only during 'build' or 'serve'.
Automatic Dependency Discovery
Vite crawls source code to discover bare imports and uses them as pre-bundle entry points.
Browser Cache
Resolved dependency requests are strongly cached with immutable headers and version queries.
Build
Build for production with vite build.
Build Command
Bundles code with Rolldown into optimized static assets.
Command Line Interface
Provides vite, vite build and vite preview commands with options like --port and --open.
CommonJS/UMD to ESM Conversion
Converts CommonJS and UMD dependencies to ESM with smart import analysis for named imports.
create-vite Templates
Scaffolds projects from templates for vanilla, Vue, React, Preact, Lit, Svelte, Solid, Qwik and TypeScript.
CSS Modules
Support for CSS Modules.
Dev server
Start Vite dev server in the current directory; vite dev and vite serve are aliases.
emitDecoratorMetadata
enforce modifier
Set plugin position with pre, default, or post.
Environment API
Lets frameworks define custom environments like edge runtimes and service workers with their own module resolution.
ESM-only source code
Source code can only be written in ESM; non-ESM dependencies are pre-bundled as ESM.
Features
File System Cache
Caches pre-bundled deps in node_modules/.vite, invalidated by lockfile, patches, config, NODE_ENV.
Framework-agnostic core
Vite core is framework agnostic, with polished plugins for each UI framework.
Full Bundle Mode
An explored dev server mode that bundles code like production to reduce network overhead for very large codebases.
Glob Import
Import multiple modules using glob patterns.
Hot Module Replacement
index.html Entry Point
index.html is treated as source code and part of the module graph.
isolatedModules
JavaScript API
Fully typed JavaScript API for extensibility.
JS API
JS API lets App Framework authors use Vite features to create tailored experiences.
Legacy Browser Support
Legacy browsers can be supported via the official @vitejs/plugin-legacy.
Legacy Browser Support
Obsolete browsers supported via official @vitejs/plugin-legacy.
Modern Worker syntax
Web workers are encouraged to be written with the new Worker syntax.
Monorepo Linked Dependencies
Detects linked deps not resolved from node_modules and treats them as source code.
Multi-page app support
Supports multiple .html entry points.
npm Dependency Resolving and Pre-Bundling
Optimize
Pre-bundle dependencies; deprecated as pre-bundling runs automatically.
optimizeDeps Configuration
Include or exclude dependencies and customize Rolldown via optimizeDeps options.
Other Compiler Options Affecting the Build Result
paths
Plugin API
Fully typed Plugin API for extensibility.
Plugin presets
plugins accepts presets containing several plugins as a single element.
plugins array
Plugins are added to the plugins array in vite.config.js.
Preview
Locally preview the production build; not designed as a production server.
Production Bundling
Bundling is still used for optimized production builds to avoid extra network round trips from nested imports.
Rolldown Unified Toolchain
Rolldown unifies dev and build into a single Rust-based bundler using Oxc for parsing, transforming, and minifying.
Rollup plugin compatibility
Plugin system based on a superset of Rollup's plugin API; Rolldown maintains Rollup plugin interface compatibility.
target
Transpile Only
TypeScript
TypeScript Compiler Options
useDefineForClassFields
Web Workers
Import web workers with constructors or query suffixes.
WebAssembly
WebAssembly support with ESM integration.