Vite
ELI5 — The Vibe Check
Vite is what happens when someone got sick of waiting 30 seconds for Webpack to start. It uses the browser's own module system during development so your changes show up almost instantly. It's French for 'fast' and boy does it live up to the name.
Real Talk
Vite is a next-generation frontend build tool that leverages native ES modules in the browser for near-instant development server startup and Hot Module Replacement. For production, it uses Rollup under the hood to produce optimized bundles. It supports Vue, React, Svelte, and vanilla JS out of the box.
Show Me The Code
// vite.config.js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
server: { port: 3000 }
})
When You'll Hear This
Vite cold starts in under 300ms on this project.,We scaffolded with 'npm create vite@latest'.,Vite's plugin ecosystem has grown massively.
Related Terms
Bundler
A bundler is the robot that smashes all your separate JavaScript files, CSS, images, and random imports into one (or a few) neat packages that the browser...
esbuild
esbuild is a bundler written in Go (not JavaScript) which means it's absolutely unhinged fast — like 10-100x faster than other bundlers.
Hot Module Replacement (HMR)
HMR is the magic that makes your browser update instantly when you save a file — without refreshing the whole page and losing your app state.
Rollup
Rollup is the bundler you use when you're building a library rather than an app.
Webpack
Webpack is the OG bundler — the grumpy grandpa of the JavaScript build world.