esbuild vs Vite
esbuild: Bundling libraries, CLIs and server code with minimal configuration.; Vite: The default build tool for new frontend projects.
| Field | esbuild | Vite |
|---|---|---|
| Pricing | Open source | Open source |
| Open source | Yes | Yes |
| Self-hostable | Yes | Yes |
| Ecosystem | JavaScript / TypeScript | JavaScript / TypeScript |
| License | MIT | MIT |
| Category | Build & packages | Build & packages |
esbuild
An extremely fast JavaScript and TypeScript bundler and minifier written in Go.
Choose esbuild if
Bundling libraries, CLIs and server code with minimal configuration.
Why it’s here
esbuild is a bundler and minifier for JavaScript, TypeScript, JSX and CSS, written in Go, with a CLI, a JavaScript API and a Go API. Its published benchmark bundles 10 copies of three.js with minification and source maps in 0.39 s, against 14.91 s for Parcel 2, 34.10 s for Rollup 4 plus terser and 41.21 s for webpack 5, on a 6-core 2019 MacBook Pro (benchmark details). It reaches that speed without a cache (home).
Pick it when
- You bundle a Node service, CLI or serverless function and the whole build is one command, such as
esbuild app.js --bundle --platform=node --outfile=out.js(getting started). - Your own tool or script needs to bundle or transform code. Amazon CDK and Phoenix use esbuild as a library, and Vite used it for TypeScript transforms for quite a while (production readiness).
- You only need TypeScript types stripped, not checked. esbuild parses TypeScript and discards the annotations; run a separate
tsctype check alongside it (TypeScript).
Skip it when
- You need hot-module replacement for JavaScript. The docs say it "is not currently implemented", and the maintainer lists it as out of scope (API, roadmap). Use Vite.
- You publish a TypeScript library with types. esbuild does not generate
.d.tsfiles, and does not supportemitDecoratorMetadata(TypeScript caveats). - You must output ES5. Transforming ES6+ to ES5 "is not supported yet" (JavaScript caveats).
- You depend on fine-grained code splitting. The maintainer calls it "pretty primitive" (production readiness).
Current state
The latest release is 0.28.2, published 2026-08-08; the one before it was 0.28.1 on 2026-06-11 (releases). The license is MIT, copyright Evan Wallace (LICENSE). He is the main developer, writes that he is "not doing active feature development" at the moment, and still maintains the project and ships periodic releases (roadmap, production readiness). Vite 8 made esbuild an optional dependency, needed only by plugins that call transformWithEsbuild (Vite migration guide).
Setup
The docs pin the exact version at install (install):
npm install --save-exact --save-dev esbuild
Watch out for
esbuild is below 1.0 and uses minor versions for backwards-incompatible changes, so pin the exact version or the major and minor (production readiness). It compiles each file in isolation, so turn on isolatedModules in tsconfig.json (TypeScript caveats). Plugins cannot modify the AST, and a plugin that runs on every file slows the build, most of all one written in JavaScript (plugin limitations). esbuild treats all inputs, including node_modules, as trusted and is not a sandbox, and its development server is not meant for production (not a sandbox).
Vite
A frontend build tool with an instant dev server, fast hot module replacement and optimized production builds.
Choose Vite if
The default build tool for new frontend projects.
Why it’s here
Vite is the dev server and production build tool that Nuxt, SvelteKit, Astro, React Router, Analog and SolidStart use as their foundation, and Vitest and Storybook build on it (Why Vite). In development it serves your source as native ES modules and transforms each file when the browser requests it, so start-up does not grow with app size. Vite 8, released 2026-03-12, replaced the esbuild-plus-Rollup pair with one Rust bundler, Rolldown, which the Vite team measures at 10-30x faster than Rollup. Linear reported production builds falling from 46 s to 6 s during the preview (Vite 8).
Pick it when
- You start a new web app in React, Vue, Svelte, Solid or Preact.
npm create vite@latestscaffolds one (getting started). - You already have Rollup-style plugins. Rolldown supports the same plugin API as Rollup and Vite, and most existing Vite plugins work with Vite 8 unchanged (Vite 8).
- You deploy to Cloudflare Workers. VoidZero worked extensively with Cloudflare on the Vite Environment API and Cloudflare's Vite plugin (VoidZero).
Skip it when
- Your app is large enough that the dev server's many unbundled requests slow page loads. The Vite team says "exceptionally large codebases" see this and is exploring a dev mode that bundles (Why Vite).
- You depend on many webpack plugins and loaders. Rsbuild's docs say migrating from the webpack ecosystem is more straightforward there (Rsbuild).
- You support browsers older than Chrome 111, Edge 111, Firefox 114 or Safari 16.4 and do not want to configure for it. That is the default production target; lower
build.targetor add@vitejs/plugin-legacy(build guide).
Current state
The latest release is 8.3.8, published 2026-11-11 (releases). The license is MIT (LICENSE). The current minor gets regular fixes; the previous major's last minor gets important fixes and security patches, and Vite requires Node.js 20.19+ or 22.12+ (releases policy, requirements). On 2026-06-04 VoidZero, the company Evan You started in 2023, announced it is joining Cloudflare. The post says Vite stays open source and MIT licensed and the same team keeps leading it (announcement).
Setup
npm create vite@latest
Watch out for
Vite 8 swapped its internals, so check the migration guide before upgrading from 7. Default imports from CommonJS modules are now handled consistently, which "may break some existing code"; legacy.inconsistentCjsInterop: true restores the old behavior temporarily. build.minify: 'esbuild' and the esbuild option are deprecated, and esbuild is now an optional dependency. Vite transpiles TypeScript without type checking, so type checking has to come from your editor or build, and set isolatedModules: true because the Oxc transformer does not support features such as const enum (features). Development serves unbundled modules and production serves a bundle, so run vite preview against the real build before shipping; it is a local check, not a production server (static deploy guide).