esbuild VS terser

Compare esbuild vs terser and see what are their differences.


An extremely fast JavaScript and CSS bundler and minifier (by evanw)


🗜 JavaScript parser, mangler and compressor toolkit for ES6+ (by terser)
Our great sponsors
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • SaaSHub - Software Alternatives and Reviews
esbuild terser
202 13
31,790 7,031
- 2.0%
9.8 8.3
11 days ago 6 days ago
Go JavaScript
MIT License GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of esbuild. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-05-20.
  • Using the ESBuild plug-in mechanism to achieve the desired functionality
    2 projects | | 20 May 2022
    esbuild is a general purpose code compiler and build tool that uses golang builds, it is very fast and 1~2 orders of magnitude higher in performance than the existing js toolchain. It's not an out-of-the-box build tool yet, but with its plugin system we can already do a lot of things.
    2 projects | | 20 May 2022
    import { Plugin } from 'esbuild' /** * Automatically exclude all dependencies * Some regular expression syntax of js is not supported by golang, see */ export function autoExternal(): Plugin { return { name: 'autoExternal', setup(build) { build.onResolve({ filter: /. */ }, (args) => { if (/^\. {1,2}\//.test(args.path)) { return } return { path: args.path, external: true, } }) }, } }
  • Go: The language of cloud-native development - SD Times
    3 projects | | 10 May 2022
    But then you see stuff like ESBuild, where the Evan Wallace (the author) tried to write in both Rust and Go, and his Go version was faster. According to him, this was probably because Go runs destructors in a parallel thread, whereas Rust runs them in the same thread (source), among other factors. The same performance could theoretically be achieved in Rust, but it would demand a lot more effort.
  • Better Backend DX: Fastify + ESBuild = ⚡️
    8 projects | | 9 May 2022
    Use esbuild as a compiler and backend bundler
    8 projects | | 9 May 2022
    Will provide an alternative solution for Windows later. (ref:
  • Unix command line conventions over time
    9 projects | | 7 May 2022
  • Why You Should Ditch Create-React-App for Vite
    1 project | | 5 May 2022
    Esbuild is a Javascript build tool written in Go, which pre-bundles dependencies 10-100 times faster than Javascript-based bundlers.
  • Make your end to end tests fast
    3 projects | | 4 May 2022
    We did this via the npm threads wrapper and esbuild. We first moved all of our compute code into a new file with minimal imports, called imageCompare.worker.js. We then added a pre-compilation step with esbuild to compile this file into a bundle. We then spawn the worker using this generated file as a blob, and interact with it via the threads promise interface.
  • Is typescript better than JS?
    1 project | | 2 May 2022
    Though, if you want to use one, do yourself a favor and give esbuild a try. It is orders of magnitude faster, at the cost of less flexibility.
  • How I Build and Deliver B2B SaaS Software as a 1.5* Person Indie Developer
    12 projects | | 19 Apr 2022
    Make my builds faster by forcing myself onto esbuild from the beginning, even if that makes delivering some capabilities harder (like web workers and service workers, Hot Module Replacement, and so on).


Posts with mentions or reviews of terser. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-04-16.
  • You don't need void 0
    1 project | | 10 May 2022
    However, it is best to leave basic code size optimizations to minifiers such as Terser as part of the product bundling process. They can perform many different optimizations, and the source code remains more readable without any manual code size optimizations like using void 0 instead of undefined.
  • Writing your own module bundler
    2 projects | | 16 Apr 2022
    Thus we have written our own module bundler by following the rollup way. We can also support a few extra options like code minification and mangling by using terser, we can also support iife format by wrapping the bundle with an iife expression. Since this is a basic example on how a bundler works, I have skimmed through a few stuffs, but in practice module bundlers are quite complex and interesting to learn about.
  • Tilepieces
    3 projects | | 8 Apr 2022
    The project is built with itself, and uses some of the popular frontend libraries like codemirror and terser.To build a tilepieces application, read the instructions.
  • introducing tilepieces: An open source project to visually editing HTML documents and Web applications
    4 projects | | 6 Apr 2022
    Tilepieces is a software that allows you to create applications for editing HTML documents, using some of the popular interfaces of the browser developer tools (with which it is possible to integrate css edits). Tilepieces also allows you to reuse your favorite code and libraries, and exposes APIs that are useful for editing multiple files at a time. You can start using tilepieces with its progressive web application version! Why Tilepieces? Tilepieces has everything you need to manage and design the layout of all your web projects, be they newsletters, banners, websites or web applications. Any library and framework can be reused using its component data structure, similar to NPM's package.json. These data structures can be populated by the application itself. Its API and the possibility of customization make it perfect as the basis of a CMS How Tilepieces works The project is built with itself, and uses some of the popular frontend libraries like codemirror and terser. To build a tilepieces application, read the instructions. How to use Tilepieces You can start use tilepieces immediately with its progressive web application version. If you like Node.js, there is an npm package for you that will launch the application in your favourite browser.
  • Popular "Video Ad-Block, for Twitch" Extension with 600k users, has removed the source code from GitHub and completely privatized it. The latest update requires new permissions to "read and change your data on all sites" adding ""aradb-21" as a referral tag to product URLs.
    41 projects | | 30 Mar 2022
    Have you even tried Terser? While it doesn't obfuscate it does transform a lot of code, so the actual output depending on the config you use is dramatically different.
  • Today is the day: ls-lint just reached more then 1 million downloads
    5 projects | | 23 Feb 2022
    ls-lint is an extremely fast directory and filename linter: GitHub 1 million npm downloads and over ~110 000 downloads per month is huge! Thank you to all users that made this happen! <3 This day also marks the release of the version 1.11.0 which brings several improvements: - Massive performance improvements: up to 1100% faster to version 1.10.x (see benchmarks) - New SCREAMING_SNAKE_CASE rule - The warn option gives you the opportunity to migrate your project seamlessly - The debug option allows support for debugging your config - Major updates for all dependencies Would love to see more and more people like nuxt.js, renovate and terser playing with this to bring more and more structure to their projects <3
  • State of the Web: Bundlers & Build Tools
    17 projects | | 23 Jan 2022
    However, the first example is smaller and therefore transferred faster. Now, you might think you have to sacrifice size for readability, but there is a solution, minifiers. Minifiers automatically transform your source code into a smaller form. In fact, the first code example was generated by Terser, which is one of the best minifiers. Bundlers make using minifiers easy through plugins. Additionally, bundlers help perform other optimizations, like tree shaking, which removes unused code. Finally, bundling scripts itself can improve performance by reducing HTTP requests needed.
  • Is anyone using Google Closure Compiler? And why not?
    5 projects | | 11 Dec 2021
    We use terser, a minifier which is part of webpack and usually outperforms Closure Compiler for gzipped output. It's on by default since webpack 4, so it's the lower-effort solution.
  • Simple mistake to ruin Webpack bundle optimization
    5 projects | | 13 Oct 2021
    What you might not know, it's not the webpack that cleans up dead code per se. Of course, it does bulk of "preparation" work, but it is terser package that actually will *cut off * unused code. Terser is JavaScript parser, mangler and compressor toolkit for ES6+.
  • Intro to ViteJS
    6 projects | | 15 Sep 2021
    Under the hood, Vite uses esbuild. For CSS, it can handle PostCSS if you add a config for it, or css-modules if you add .module.css files, or sass. It will also make liberal use of the import.meta to add some sugar methods like glob imports or adding environment variables. You can switch the build to use terser and get a slightly smaller build, but it is a little slower. In my regular usage, I don't notice a huge difference, so I leave esbuild as default.

What are some alternatives?

When comparing esbuild and terser you can also consider the following projects:

swc - Rust-based platform for the Web

vite - Next generation frontend tooling. It's fast!

Rollup - Next-generation ES module bundler

webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

parcel - The zero configuration build tool for the web. 📦🚀

Tailwind CSS - A utility-first CSS framework for rapid UI development.

import-maps - How to control the behavior of JavaScript imports

Snowpack - ESM-powered frontend build tool. Instant, lightweight, unbundled development. ✌️ [Moved to:]

PostCSS - Transforming styles with JS plugins

ts-node - TypeScript execution and REPL for node.js

svgr - Transform SVGs into React components 🦁

tsup - The simplest and fastest way to bundle your TypeScript libraries.