Vite is a next-generation frontend build tool that provides instant hot module replacement and fast production builds. Created by Evan You (Vue.js creator), it uses native ES modules in development and Rollup for production bundling.

How Vite Works

Vite starts a dev server in milliseconds regardless of project size — it serves source files directly using native browser ES modules instead of bundling everything upfront like Webpack. Changes appear in the browser in under 50ms.

Key Concepts

  • Native ESM — Vite serves source files as ES modules — the browser handles module resolution during development
  • Instant HMR — Hot Module Replacement updates only the changed module in under 50ms

Frequently Asked Questions

Why is Vite faster than Webpack?

Webpack bundles everything before serving. Vite serves source files directly via native ESM and only transforms files on demand. This makes startup instant regardless of project size.