vite
TLDR
Start the development server
SYNOPSIS
vite [command] [options]
DESCRIPTION
Vite is a next-generation frontend build tool that provides an extremely fast development experience. It leverages native ES modules in the browser during development, eliminating the bundling step for faster hot module replacement (HMR).
For production, Vite bundles code using Rollup, producing optimized static assets. It supports TypeScript, JSX, CSS preprocessing, and various frameworks (Vue, React, Svelte) out of the box.
Configuration is typically stored in vite.config.js or vite.config.ts. Vite requires Node.js 20.19+ or 22.12+.
PARAMETERS
dev, serve
Start development server (default command).build
Build for production.preview
Locally preview production build.optimize
Pre-bundle dependencies.-c, --config file
Use specified config file.--base path
Public base path for the build.--mode mode
Set env mode (development, production).--port port
Port number for dev server.--host host
Hostname to listen on.--open [path]
Open browser on server start.--force
Force dependency pre-bundling.--clearScreen
Clear terminal screen on start.-l, --logLevel level
Log level: info, warn, error, silent.-d, --debug [filter]
Enable debug mode with optional filter.-h, --help
Display help message.-v, --version
Display version.
CAVEATS
The preview server is not designed for production use; deploy the built files with a proper static file server. Some Node.js APIs are not available in the browser during development. Legacy browser support requires the @vitejs/plugin-legacy plugin.
HISTORY
Vite was created by Evan You (creator of Vue.js) and first released in April 2020. The name means "fast" in French. Vite 2.0, released in February 2021, was a major rewrite that made it framework-agnostic. It has rapidly gained adoption as an alternative to webpack, influencing the broader JavaScript tooling ecosystem.


