esbuild
ELI5 — The Vibe Check
esbuild is a bundler written in Go (not JavaScript) which means it's absolutely unhinged fast — like 10-100x faster than other bundlers. Vite uses it internally to pre-bundle dependencies. It's the secret speed demon behind modern tooling.
Real Talk
esbuild is an extremely fast JavaScript and TypeScript bundler and minifier written in Go. It achieves speed through parallel processing, avoiding unnecessary work, and efficient memory use. It is often used as a preprocessor or minifier inside other tools like Vite, rather than as a standalone build system.
Show Me The Code
// Using esbuild's JS API
import * as esbuild from 'esbuild'
await esbuild.build({
entryPoints: ['src/app.js'],
bundle: true,
minify: true,
outfile: 'dist/out.js'
})
When You'll Hear This
esbuild finishes in 80ms what Webpack takes 8 seconds to do.,Vite uses esbuild to pre-bundle node_modules.,We switched the minification step to esbuild and shaved 40s off CI.
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...
Minify
Minification is when your code goes on a diet.
Rollup
Rollup is the bundler you use when you're building a library rather than an app.
Vite
Vite is what happens when someone got sick of waiting 30 seconds for Webpack to start.