esbuild VS Rollup

Compare esbuild vs Rollup and see what are their differences.

esbuild

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

Rollup

Next-generation ES module bundler (by rollup)
Our great sponsors
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • SaaSHub - Software Alternatives and Reviews
esbuild Rollup
203 29
31,869 21,658
- 1.1%
9.8 9.4
2 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.

esbuild

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-28.
  • in case anyone was interested, I made a very basic and raw react app setup! TS + ESBUILD
    3 projects | reddit.com/r/reactjs | 28 May 2022
    I created this little repo to be very barebones but just enough to get started. Esbuild is lighting fast and it's a great jump point to test out some ideas and just start developing without any headache!
  • Using the ESBuild plug-in mechanism to achieve the desired functionality
    2 projects | dev.to | 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 | dev.to | 20 May 2022
    import { Plugin } from 'esbuild' /** * Automatically exclude all dependencies * Some regular expression syntax of js is not supported by golang, see https://github.com/evanw/esbuild/issues/1634 */ 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 | reddit.com/r/golang | 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 | dev.to | 9 May 2022
    Use esbuild as a compiler and backend bundler
    8 projects | dev.to | 9 May 2022
    Will provide an alternative solution for Windows later. (ref: https://github.com/evanw/esbuild/issues/976)
  • Unix command line conventions over time
    9 projects | news.ycombinator.com | 7 May 2022
  • Why You Should Ditch Create-React-App for Vite
    1 project | dev.to | 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 | dev.to | 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 | reddit.com/r/AskProgramming | 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.

Rollup

Posts with mentions or reviews of Rollup. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-04-06.
  • JavaScript Module Ecosystem
    3 projects | dev.to | 6 Apr 2022
    If you've done web development for any amount of time, there's a good chance you've had to work with tools like Webpack, Rollup, Browserify and other front-end tooling systems. But do you know why we started using them in the first place, and why they are still part of our everyday workflow?
  • The React CLI you always wanted but didn’t know about
    11 projects | dev.to | 30 Mar 2022
    One of the advantages of using Nx over - say CRA or a custom starter template - is that your Nx workspace is evergreen. What do I mean by that: by now we all know how fast the frontend space is moving, and so are the corresponding devtools. Today you might be using Rollup to build your libraries, tomorrow you use swc, vite or esbuild. Same with Webpack. Webpack 5 has been around for a while already, and still, a lot of projects are stuck at v4.
  • Tree shaking create-react-app?
    4 projects | reddit.com/r/codehunter | 24 Mar 2022
    How can I use tree shaking tools (like in Webpack 2 or rollup?I don't want to eject already so seems like I don't really have access to the Webpack configuration.
  • Creating a TypeScript React Application with Vite
    5 projects | dev.to | 15 Mar 2022
    Vite addresses this problem by providing a development server and a lightning-fast build command. Vite, pronounced /vit/, is French for "quick," and this name describes the goal for this tool. The build command uses Rollup under the hood, which is preconfigured to create highly optimized code. The development server makes use of browser support for ES modules. Hot Module Replacement will instantly load any codebase changes into the browser.
  • Svelte Native vs. React Native: A comparison guide
    7 projects | dev.to | 16 Feb 2022
    Svelte Native is based on Svelte, and it allows Svelte developers to build native Android and iOS applications. It was initially released in November 2021 by Rich Harris, the Creator of Rollup, the popular JavaScript module bundler.
  • State of the Web: Bundlers & Build Tools
    17 projects | dev.to | 23 Jan 2022
    Nowadays, almost every web developer uses one bundler or another. Webpack is by far the most popular, with Rollup and Vite in second and third, respectively. Currently, Vite is the fastest-growing major bundler, which has been adopted by frameworks like Vitepress, SvelteKit, Astro, and more.
  • What is flat bundling and why is Rollup better at this than Webpack?
    2 projects | reddit.com/r/codehunter | 22 Jan 2022
    I have recently been looking into rollup and seeing how it differs from Webpack and other bundlers. One thing I came across was that it is better for libraries because of "flat bundling". This is based on a tweet and from a recent PR for React to utilize Rollup.
  • Configuring CommonJS & ES Modules for Node.js
    6 projects | dev.to | 3 Jan 2022
    This also means that whatever build tooling must produce the distribution file with a .cjs file extension. This might necessitate chaining multiple build tools or adding a subsequent step to move/rename the file to have the .cjs file extension (ex mv ./dist/index.js ./dist/index.cjs)3. This can be worked around by adding a subsequent step to move/rename those outputted files (ex Rollup or a simple shell script).
  • Make SvelteKit bundle all *.ts files into a single bundle.js
    1 project | reddit.com/r/sveltejs | 1 Jan 2022
    I think Rollup is where the code-splitting is happening so you will need to address the problem there. Here is an ongoing discussion that seems to have some solutions: https://github.com/rollup/rollup/issues/2756
  • Vite, the hassle-free alternative to Webpack
    4 projects | dev.to | 12 Nov 2021
    Vite doesn't create itself the bundles. Under the hood, it uses two tools: Esbuild while you're developing, and Rollup.js to create the production bundle.

What are some alternatives?

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

swc - Rust-based platform for the Web

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

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.

Snowpack - ESM-powered frontend build tool. Instant, lightweight, unbundled development. ✌️ [Moved to: https://github.com/FredKSchott/snowpack]

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

terser - 🗜 JavaScript parser, mangler and compressor toolkit for ES6+

PostCSS - Transforming styles with JS plugins