What Is Vite? The Fast Front-End Build Tool Explained
Vite is a front-end build tool that serves source over native ES modules in development for instant startup and bundles with Rollup for production.
Vite (French for "fast") rethought the dev-server experience. Instead of bundling everything up front, it serves your source as native ES modules and transforms files on demand, so the dev server starts instantly even in large apps. For production it produces an optimized Rollup bundle.
What Vite is
Vite is a build tool and dev server for modern web projects. In development it leverages the browser's native ES module support plus esbuild for fast transforms, giving near-instant server startup and hot module replacement. For production it bundles with Rollup, applying minification and optimizations.
How it works
During development, Vite does not bundle your app; the browser requests modules directly and Vite transforms each on the fly using esbuild, which is written in Go and extremely fast. It pre-bundles third-party dependencies once with esbuild for speed. The production build switches to Rollup to produce optimized, tree-shaken output.
A config example
Configuration is minimal, often just a plugin.
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
build: { sourcemap: true }
});Role in CI/CD
In CI, "vite build" produces the production bundle for deployment. Builds are fast thanks to esbuild-powered transforms, but large apps still benefit from caching node_modules and any persistent build cache between runs. Type-checking is usually a separate "tsc" step in the pipeline since Vite does not type-check during the build.
Alternatives
Webpack is the older, more configurable bundler still common in large apps. Parcel offers zero-config bundling. Turbopack and Rspack are newer, fast bundlers. Vite has become the default for new front-end projects because of its dev speed and sensible defaults.
Key takeaways
- Vite serves native ES modules in dev for instant startup and HMR.
- It uses esbuild for transforms and Rollup for production bundles.
- In CI, "vite build" is fast; run type-checking as a separate tsc step.