esbuild VS Snowpack

Compare esbuild vs Snowpack and see what are their differences.

esbuild

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

Snowpack

ESM-powered frontend build tool. Instant, lightweight, unbundled development. ✌️ [Moved to: https://github.com/FredKSchott/snowpack] (by withastro)
Our great sponsors
  • Zigi - Delete the most useless function ever: context switching.
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • Scout APM - Truly a developer’s best friend
  • SonarLint - Clean code begins in your IDE with SonarLint
esbuild Snowpack
258 69
34,069 19,787
- -
9.8 8.4
about 18 hours ago 8 months ago
Go JavaScript
MIT License MIT License
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-12-01.
  • AoC Runner for JavaScript and TypeScript
    3 projects | reddit.com/r/adventofcode | 1 Dec 2022
    Runs your solutions in watch mode (with extremely fast compilation for TS using esbuild).
  • E2E Reactivity using Svelte with Phoenix LiveView
    3 projects | dev.to | 17 Nov 2022
    We specify which Svelte component to render from the LiveView component above by setting data-name to the variable name of the import. Note that the variable name of the import must match the data-name attribute of the LiveView component div. Yes this is souper hacky, but due to limitations in esbuild, a dynamic require isn't possible isn't possible 🤦.
  • NodeJs server with JSX routing (feat Fastify)
    5 projects | dev.to | 5 Nov 2022
    esbuild: Transpile JSX and bundle server code
  • The TypeScript compiler is now implemented internally with modules
    16 projects | news.ycombinator.com | 2 Nov 2022
    There are two performance implications of "modularization": initialization-time and run-time.

    You are correct that initializing many modules is usually slower than initializing one module [1]. However, bundling puts all modules into one file, so this PR doesn't actually change anything here. Both before and after this PR, the TypeScript compiler will be published as a single file.

    At run-time, switching to ES modules from another JavaScript module system can be a significant performance improvement because it removes the overhead of communicating between them. Other module systems (e.g. TypeScript namespaces, CommonJS modules) use dynamic property accesses to reference identifiers in other modules while ES modules use static binding to reference the identifiers in other modules directly. Dynamic property access can be a big performance penalty in a large code base. Here's an example of the performance improvement that switching to ES modules alone can bring: https://github.com/microsoft/TypeScript/issues/39247.

    [1] This is almost always true. A random exception to this is that some buggy compilers have O(n^2) behavior with respect to the number of certain kinds of symbols in a scope, so having too many of those symbols in a single scope can get really slow (and thus splitting your code into separate modules may actually improve initialization time). This issue is most severe in old versions of JavaScriptCore: https://github.com/evanw/esbuild/issues/478. When bundling, esbuild deliberately modifies the code to avoid the JavaScript features that cause this behavior.

  • Speed up Node application build time with ESBuild
    6 projects | dev.to | 2 Nov 2022
    I am a big fan SWC and ESBuild, both look like promising tools. But when i find TSX library (not to be confused with React TSX) my choice for the next application was made. What is it? TSX is designed to be a drop-in replacement for node, so you can use it just the way you would use Node, and it is so easy to setup, or make migration from Babel to ESBuild.
  • esbuild Ignore With Comments Plugin
    3 projects | dev.to | 31 Oct 2022
    While esbuild provides a number of tools to exclude certain files or dependencies, I found these insufficient for my needs and thus developed the esbuild-ignore-with-comments-plugin.
  • Setup React App with esbuild
    2 projects | dev.to | 31 Oct 2022
    ESBuild is the solution of that frustrating issue.
  • Are there build systems for the JS/TS world?
    3 projects | reddit.com/r/typescript | 28 Oct 2022
    Oh yeah, in that sense it's even easier because you can just run scripts. Kinda like python. You can install tsx to run typescript files directly. For dependency management I use pnpm, which also comes with a workspace feature for linking dependencies in one monorepo. For compiling I like esbuild because of it's speed, though it doesn't do type checking
  • The creator of Webpack introduces Turbopack, a Rust-based successor that's 700x faster
    6 projects | reddit.com/r/rust | 25 Oct 2022
    If you just want to compile typescript / jsx / react to javascript you'd use a bundler like esbuild or swc.
  • Vercel announces Turbopack, the successor to Webpack
    21 projects | news.ycombinator.com | 25 Oct 2022
    Automatic JSX runtime was added to esbuild in 0.14.51: https://github.com/evanw/esbuild/pull/2349

Snowpack

Posts with mentions or reviews of Snowpack. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-03-25.
  • How to replace webpack & babel with Vite on a legacy React Typescript project
    11 projects | dev.to | 25 Mar 2022
    Then there was Webpack which seemed like it would be around for a while. Even after things like Parcel and Snowpack came on the scene people still recommended Webpack. I mean, it's still the backbone of create-react-app. An then, Vite was released.
  • State of the Web: Bundlers & Build Tools
    17 projects | dev.to | 23 Jan 2022
    Unbundled development utilizes native ESM support in browsers to offer an ultra-fast development experience. Unlike a traditional bundler which bundles everything in development, unbundled development transforms the code and rewrites import paths to the ESM compliant file path without bundling your code. Additionally, most bundlers that do this pre-bundle dependencies because that decreases the number of imports needed, and dependencies are unlikely to change often. The two most prominent bundlers that utilize unbundled development are Vite and Snowpack. Snowpack, created in 2019, was the first bundler to have an unbundled development experience. However, while Snowpack was popular for some time, this did not last forever. In 2020, the team behind Vue created Vite. Vite has many advantages over Snowpack, like the ease of use, speed, better optimization, and more. Additionally, popular projects like SvelteKit adopted Vite instead of Snowpack. All of this helped Vite pass Snowpack in downloads, and it now has more than 10x downloads compared to Snowpack. In fact, even Astro, a project created by the team behind Snowpack (be on the lookout for an article about Astro), is now using Vite. Overall, if you want fast, unbundled development, I recommend Vite.
  • What are the new and exciting tech for React projects for 2022?
    16 projects | reddit.com/r/reactjs | 5 Jan 2022
    I've been hearing good things about snowpack and have been wanting to give it a go myself as an alternative to webpack/babel
  • Converting to Vite (Part 1)
    4 projects | dev.to | 5 Jan 2022
    So how did we get here? Well, it's a good thing to describe alternatives considered when you add issues to a repo! Months ago, @0vortex described in Issue #1131 some opportunities for dependency updates that would require version 5 of webpack with our webpack configuration, and warned that the dependency management would probably be tricky. I fixated on an alternative that he mentioned about converting the project to use Snowpack. I had wanted to learn more about bundling tools, so I took a few days here and there after Thanksgiving and got Open Sauced mostly working with it (see PR #1320).
  • npx create-react-app not working -- everything is deprecated
    5 projects | reddit.com/r/react | 11 Dec 2021
  • React 101: The Basics
    12 projects | dev.to | 30 Nov 2021
    I have written a post about setting up a React project using Parcel as a bundler which can give a more detailed walkthrough about getting a React application up and running from scratch. There are multiple ways to do this but some of the more common build tools include Webpack, Parcel, and Snowpack.
  • SolidJS on Snowpack – Quick Dev Guide
    2 projects | dev.to | 17 Nov 2021
    For more information about this issue, check these issue tickets: Issue 2998, Issue 3219, Issue 3243
  • Etsy’s Journey to TypeScript
    6 projects | news.ycombinator.com | 16 Nov 2021
    The number of transforms that Babel is doing with an "evergreen" config ("last 2 browser versions") at this point is effectively miniscule. It's a massive toolchain for what increasing turns out to be a minimal amount of actual work. "Last 2 Browser Versions" is effectively everything through ES2019 at this point which covers almost all of the "modern JS syntax". If you aren't using custom transforms you might not be transforming anything that matters in Babel in 2021. I've seen a bunch of projects with huge Babel pipelines where the only actual transform was Typescript's type removal and at that point, if your codebase is entirely Typescript, Typescript has all the downlevel transforms you need "baked in" (and arguably a little bit cleaner and simpler to Babel's kitchen sink but also still somehow millions of plugins approach) and it's just setting Typescript's compile option to the ES level you are most comfortable with. (In 2021 that may even be as high as { "target": "es2019" } or higher in your tsconfig.json and even there Typescript's not going to even need to downlevel much.) Typescript can also transform TSX/JSX to JS without the need of Babel, if you are using React.

    Even ES2015 modules which some people still think is the big reason to keep Babel around: a) has full Browser support if you use type="module", but most people still want to pack their JS because just about no one is assuming HTTP/2 or HTTP/3 yet, and b) Babel has never done module format transforms, that's always been the domain of your packer (webpack, parcel, rollup, snowpack, what have you).

    If you are updating your project stack in 2021 right now my personal top recommendation is that I really like the approach of snowpack (https://www.snowpack.dev/): ES2105 modules with dev experience (which is great), great Typescript support, and a simpler overall config experience than most other options right now. (It uses esbuild under the hood rather than babel for dev and basic transforms/bundling. It can optionally piggy back webpack and parcel for Production bundling that needs more "power".) Especially that <script type='module"> dev experience feels great now (with Hot Module Reloading too) versus waiting for a full bundle even for dev builds.

  • Build your own component library with Svelte
    10 projects | dev.to | 9 Nov 2021
    SvelteKit uses Vite under the hood, which is quite surprising, as Sapper and most tools are developed using Snowpack. Vite 2 is framework-agnostic and designed with SSR at its core.
  • Angular Is Rotten to the Core
    9 projects | news.ycombinator.com | 4 Nov 2021
    I've had some success with npm, snowpack, mocha, typescript as that sort of stack for more "vanilla" efforts that feel rather more "modern". I think mocha is easier and cleaner than jest. I like keeping all of my transpilation to just Typescript without needing a massive Babel install/pipeline. snowpack (https://www.snowpack.dev/) right now I think is in a sweet spot of a better "ES Module native" developer experience than webpack and has better defaults when left unconfigured. (So much so that while there are snowpack templates/generators provided by the project I mostly don't use them other than for reference.)

What are some alternatives?

When comparing esbuild and Snowpack 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. 📦🚀

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

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

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

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