swc-project / swc-node

Faster ts-node without typecheck
MIT License
1.76k stars 73 forks source link

Comparison with ts-node's --swc flag #649

Open Gerrit0 opened 2 years ago

Gerrit0 commented 2 years ago

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.

zingerj commented 1 year ago

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

Gerrit0 commented 1 year ago

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)