tsx VS esbuild-runner

Compare tsx vs esbuild-runner and see what are their differences.

tsx

⚡️ TypeScript Execute | The easiest way to run TypeScript in Node.js (by privatenumber)

esbuild-runner

⚡️ Super-fast on-the-fly transpilation of modern JS, TypeScript and JSX using esbuild (by folke)
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
tsx esbuild-runner
28 2
9,409 711
3.1% -
9.5 0.0
10 days ago 6 days ago
TypeScript TypeScript
MIT License Apache License 2.0
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.

tsx

Posts with mentions or reviews of tsx. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-09-01.
  • Setting up Subpath Import Aliases in a TypeScript Project
    5 projects | dev.to | 1 Sep 2024
    For other tools, you should check their documentation on custom conditions support. I've tried to run my project with tsx. As it supports all Node.js flags, I've just provided custom condition via -C flag:
  • TypeScript Execute (TSX)
    1 project | news.ycombinator.com | 25 Jul 2024
  • Effortless API Testing: Node.js Techniques for Next.js Route handlers
    8 projects | dev.to | 24 Jul 2024
    Luckily, this is a very common thing and Tsx, a can help us with this. We simply have to import this module and we'll be able to execute Typescript code with Node.js:
  • Using TypeScript in Node.js projects
    2 projects | dev.to | 8 Jul 2024
    Next, we need to set up a development script that will watch for changes in our TypeScript files and recompile them. Personally, I like to use tsx, as it provides a much faster development experience compared to the built-in TypeScript watcher or ts-node. First, install tsx:
  • Making Eleventy Data Traceable with TSX and Zod
    2 projects | dev.to | 14 May 2024
    At this point, you will have a setup which relies on tsx to understand TypeScript, and jsx-async-runtime to understand JSX/TSX templates.
  • Finally, a guide for Node.js and TypeScript and ESM that works
    18 projects | news.ycombinator.com | 21 Nov 2023
    I really enjoy frontend/node/typescript development. I roll my eyes whenever the HN-types complain about CSS or frontend development being a hellhole. Mostly the comments I see seem ignorant or impatient ("Why doesn't this thing work without be bothering to learn it?")

    However, the intersection of typescript, nodejs, and ES modules is consistently the most frustrating experience I ever have. Trying to figure out which magic incantation of tsconfig/esbuild/tsc/node options will let me just write code and run it is a fools errand. You might figure something out, and then you try to use Jest and then you descend into madness again.

    The biggest tip I can give people is to ditch ts-node and just use (the awkwardly named) tsx https://github.com/privatenumber/tsx, which pretty much just "mostly works" for running Typescript during dev for node.

    The problem mostly seems to stem for all the stakeholders being pretty dogmatic to whatever their goals are, rather than the pragmatic option of just meeting people where they are. I really wish the Node, Typescript, Deno/Bun, and maybe some bundler people would come together and figure out how to make this easier for people.

  • ERDIA: TypeORM entity specification documentation tool
    6 projects | dev.to | 28 Aug 2023
    If your TypeORM entity is written in TypeScript, you have to run ERDIA using ts-node or tsx as follows.
  • xtsz - a TS / JS file runner with support for HTTP/S imports
    5 projects | /r/node | 22 Apr 2023
    Want to import a package / file conveniently from esm.sh or unpkg or directly from a GitHub repo for a one-off script (for example). To do this I created a custom ESBuild plugin to handle HTTP imports - that worked for ,js files. To support running both ESM and CJS, I use tsx.
  • What is your must have npm package on any given project?
    15 projects | /r/webdev | 5 Apr 2023
    I prefer tsx honestly. Nodemon will detect that your using TypeScript and switch from node to ts-node but tsx is a no config necessary version of ts-node that also runs faster. Of course you can configure ts-node to use swc to be faster but then you're playing with config files to get things working.
  • Question about debugging TypeScript
    1 project | /r/typescript | 3 Apr 2023
    I highly recommend you give this a shot over ts-node

esbuild-runner

Posts with mentions or reviews of esbuild-runner. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-05-26.
  • Testing in typescript.
    2 projects | /r/typescript | 26 May 2022
    You can then use esbuild-runner to allow you to run tests written in TS. This will also work for any other test runner (mocha, tape, uvu, etc). Jest requires a bit more fiddling, as per usual. An alternative is running tests via TS-node, but it's little a bit slower.
  • n00b question
    2 projects | /r/node | 17 Apr 2021
    via ESbuild https://github.com/folke/esbuild-runner

What are some alternatives?

When comparing tsx and esbuild-runner you can also consider the following projects:

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

ts-runtime-comparison - Comparison of Node.js TypeScript runtimes

mocha-esbuild - Run tests with mocha compiled by esbuild

esno - Alias to `tsx`

TS-ESNode - Node.JS Loader hook to transform typescript source and files as node loads them TS-ESNode. TS-Node for ESNext & ESModule Node.JS.

esbuild-node-tsc - Build your Typescript Node.js projects using blazing fast esbuild

tsc-esm-fix - Make Typescript projects compatible with esm/mjs requirements

estrella - Lightweight and versatile build tool based on the esbuild compiler

dnt - Deno to npm package build tool.

bundlejs - An online tool to quickly bundle & minify your projects, while viewing the compressed bundle size, all running locally on your browser. A quick and easy way to bundle, minify, and compress (gzip and brotli) your ts, js, jsx and npm projects all online, with the bundle file size.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured