| ▲ | curtisblaine 7 hours ago | |||||||||||||||||||||||||||||||
Don't we have `tsx` and `nodemon` (or the native Node reloader) for that? What are the DX gaps you see on the server side out of on-the-fly transpilation and reload on watch? | ||||||||||||||||||||||||||||||||
| ▲ | ivanjermakov 6 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||
Yes, I use tsx for Node programs. It's not great when sharing the same codebase for both client and server code, they have completely different dev workflows. | ||||||||||||||||||||||||||||||||
| ▲ | afavour 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
One advantage of precompilation is risk reduction. Say tsx gets hacked somehow (hardly unprecedented with Node modules!) you’ve got it running on your production server exposed to the internet. Precompilation on a CI pipeline is still a risk but a significantly lower one. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | Cthulhu_ 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
In theory, typescript doesn't need to be transpiled, you can run ts files using `node --experimental-strip-types file.ts` as long as you don't use any code that needs transpilation (like typescript enums). Still need tsx to do type checking | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | curtisblaine 6 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||
@afavour if you need precompilation in CI can't you simply use... tsc? | ||||||||||||||||||||||||||||||||