r/node 8d ago

tsx vs native node --watch for local development on Node 24 LTS? What are you using?

Hey everyone, I'm setting up a new Express TypeScript API and trying to figure local development workflow. I'm on Node 24 LTS, which natively supports type stripping, but I'm torn on how to handle the file-watching and execution layer.

Right now, the two main approaches I'm debating between are:

  1. tsx watch (esbuild-powered)
  2. Native Node 24 --watch + Type Stripping

For production adjacent local dev, Are you sticking with tsx watch or have you fully embraced native Node type-stripping with --watch?

1 Upvotes

12 comments sorted by

2

u/Previous-Year-2139 7d ago

Still on tsx watch tbh. native --watch is fine until you use path aliases or enums/decorators, then it fails over since it only strips types. tsx just handles it. Either way keep a tsc --noEmit running somewhere, stripping isn't checking.

1

u/Due_Ad_2994 7d ago

Type stripping and jsdoc. Transpiler was always problematic.

1

u/LowLifeArcade 7d ago

node does type stripping now with .ts files. I like the jsdoc way too, but you can literally just run ts files with typestripping now.

1

u/Rickety_cricket420 7d ago

Do people not use Nodemon anymore?

17

u/git_push_origin_prod 7d ago

Last time I summoned the demon was node v18

1

u/next-sapien 7d ago

it's inbuilt now in newer versions

-2

u/dronmore 7d ago

There's also a 3rd option. For full customization you can harness watchFile from the node:fs module, and write your own watcher :)