News for hackers. Stuff that matters.
Re:Node.js adds experimental support for TypeScript by silverwind on Thursday July 25, 2024 @05:25AM (#41066599)
tsx has very slow startup performance, I prefer https://github.com/swc-project/swc-node which is around twice as fast.
Re:Node.js adds experimental support for TypeScript by herpdyderp on Thursday July 25, 2024 @07:56AM (#41067541)
Does swc-node work with code coverage calculation libraries? For a long time tsx didn’t (and it’s still pretty finicky) so that kept me from using it.
Re:Node.js adds experimental support for TypeScript by silverwind on Thursday July 25, 2024 @10:26AM (#41069043)
Not sure what features those need, but at least the stack traces are correct in swc-node, so maybe worth a try.
Re:Node.js adds experimental support for TypeScript by dimgl on Thursday July 25, 2024 @06:42PM (#41074228)
We have not seen this whatsoever. How big is your project? `tsx` is almost instantaneous in a server-side project of ours.
Re:Node.js adds experimental support for TypeScript by silverwind on Friday July 26, 2024 @01:57PM (#41080703)
A hello world here takes 400ms on tsx and 250ms on swc-node for me.

Basically it boils down to swc being faster than esbuild, see their benchmarks:

https://swc.rs/docs/benchmarks