wclr / ts-node-dev

Compiles your TS app and restarts when files are modified.
MIT License
3.43k stars 123 forks source link

Support swc ts-node option. #302

Open shahmirn opened 2 years ago

shahmirn commented 2 years ago

@wclr Could you take a look at this PR? It should be fairly minor.

KyleAMathews commented 2 years ago

Keen to try this out! We've got a large code base that takes ~30s to startup right now and would love to cut that down.

frederikvanhevel commented 2 years ago

+1

matsko commented 2 years ago

Any progress on this?

cspotcode commented 2 years ago

ts-node can pull all of these options from your tsconfig.json, is there some reason that can't be done when using ts-node-dev?

https://typestrong.org/ts-node/docs/configuration#via-tsconfigjson-recommended

emaciel10 commented 2 years ago

Any updates here? This would also reduce our build times by quite a bit

rafaell-lycan commented 2 years ago

+1

hansott commented 2 years ago

If you want an alternative solution, I've switched ts-node-dev to https://github.com/esbuild-kit/tsx, it's great! :)

ts-node-dev was always causing problems (high CPU, compatibility macOS/Linux) and I wanted a tool that combined watching and transpiling (so that I didn't have to install something like nodemon)

Example: npx tsx watch ./file.tsx

(I'm unaffiliated with tsx)

rubnogueira commented 1 year ago

@wclr Could you take a look at this PR? Basically, we cannot use this tool with ts-node + swc, since it overrides the transpileOnly property.