esbuild is a JavaScript bundler and minifier written in Go, and it is famously fast — often 10 to 100 times faster than bundlers written in JavaScript. It bundles, transpiles, and minifies your code in milliseconds, which changes how development feels.
Why esbuild is so fast
Most bundlers are written in JavaScript and do their work one step at a time. esbuild is written in Go, which compiles to fast native code, and it parallelises the work across your CPU cores. The result is a build that finishes before you have time to check your phone.
Your first esbuild build
Install it and bundle a file with one command:
npm install esbuild npx esbuild app.js --bundle --outfile=dist/bundle.js
Enter fullscreen mode
Exit fullscreen mode
The --bundle flag follows your imports and packs everything into one file.…