Translate modern, typed, JSX-laden source into the boring JavaScript every browser understands. Babel made the modern web possible — and now Rust-based successors are 30× faster.
← Back to Client SideArray.flat on older browsers).| Tool | Built in | Use |
|---|---|---|
| Babel | JavaScript | The original; biggest plugin ecosystem; still default in many older codebases. |
| TypeScript Compiler (tsc) | TypeScript | Type checking + emission. Slower than alternatives — most teams type-check with tsc and emit with another tool. |
| SWC | Rust | 20–70× faster than Babel; powers Next.js, Parcel, Deno, Vercel. |
| esbuild | Go | Even faster; primarily a bundler but excellent transpiler. |
| Sucrase | JavaScript | 20× faster than Babel for the common subset; dev-mode transforms. |
| OXC / Rolldown | Rust | Voidzero's next-gen toolchain — Rust everything. |
?., etc.).An important distinction in modern TypeScript pipelines:
: string annotations, rewrite enums, emit JS. Doesn't validate types — fast.--noEmit): walks the program, verifies every type. Slow but catches bugs.tsc --noEmit in CI; emit with esbuild/SWC at build time.Define your target browsers in package.json:
{
"browserslist": [
"> 0.5%",
"last 2 versions",
"not dead"
]
}
Babel + core-js auto-inject only the polyfills your targets need. Modern apps targeting only evergreen browsers can usually skip polyfills entirely.
JSX is just sugar — <div /> compiles to React.createElement('div') (classic) or the newer jsx() runtime (since React 17). The new transform doesn't require import React at the top of every file.
On a large codebase, Babel can spend 30+ seconds in a clean build. SWC drops the same job to 1–2 seconds. esbuild often under a second. The downstream effect — sub-second HMR, instant CI — has reshaped how frontends are built.
SWC (often automatic via Vite / Next.js).
tsup or unbuild (esbuild-powered) for fast dual-format publish.
Babel — the plugin ecosystem is unmatched.
tsc with --noEmit in CI alongside whatever you ship with.