esbuild VS ts-node

Compare esbuild vs ts-node and see what are their differences.

Our great sponsors
  • Scout APM - Truly a developer’s best friend
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • SonarLint - Clean code begins in your IDE with SonarLint
  • Zigi - The context switching struggle is real
esbuild ts-node
258 17
34,069 11,148
- 1.5%
9.8 8.7
about 16 hours ago about 1 month ago
Go TypeScript
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

ts-node

Posts with mentions or reviews of ts-node. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-07.

What are some alternatives?

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

swc-node - Faster ts-node without typecheck

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

esbuild-runner - ⚡️ Super-fast on-the-fly transpilation of modern JS, TypeScript and JSX using esbuild

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

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