swc-node icon indicating copy to clipboard operation
swc-node copied to clipboard

Comparison with ts-node's --swc flag

Open Gerrit0 opened this issue 3 years ago • 2 comments

ts-node has supported custom transformers for over a year now, and with that, has included support for doing transformation with swc. In recent versions (released February 2022), it also supports a simple --swc flag which handles setting the transformer up for you.

With that option set, is there a compelling reason to choose this library instead? I've been really happy with my ts-node based workflow, but am wondering if it could be even better.

Gerrit0 avatar Apr 01 '22 05:04 Gerrit0

I've also been curious about this! Somewhat related: @Gerrit0 were you able to get that --swc flag working with decorators? What does your dev script look like? Thanks

zingerj avatar Oct 04 '22 19:10 zingerj

https://github.com/TypeStrong/typedoc-site is the only project I'm currently using ts-node + swc, and I don't use decorators there, haven't used it in a project with decorators. (Somewhat of an outdated setup, should be simpler now that swc is out of experimental stage, but it still works, so haven't bothered updating)

Gerrit0 avatar Oct 10 '22 17:10 Gerrit0