Hot-reloading node.js and TypeScript

TL;DR: Use tsc-watch

I’ve spent some time researching how to get hot-reloading working with Node & TypeScript. Due to the mess that is the JS dev ecosystem, finding a solid solution took me longer I expected for this kind. Hopefully this post will save you that effort.

The best solution I found is using tsc-watch. Install it as a dev dependency and set tsc-watch –onSuccess 'node .' as your start script.

That’s it, happy hacking.

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s