Closed Berkays closed 3 years ago
I know it's a little bit too late, but yes, it is possible.
babel-watch uses babel (obviously) underneath. For typescript to work with babel, you need to add @babel/typescript preset to babel config.
After doing so, you're still left with some errors such as "Cannot use import statement outside a module", or any messages indicating babel does not parse the typescript files.
To fix that you need to run the binary with --extensions flag as follows: babel-watch path-to-entry/index.ts --extensions .ts
Closing as there is a viable solution here.
Just to a quick note that costed me half an hour to solve: remove type: "module"
from package.json
Is it also possible to watch for typescript src folder followed by normal operation? When i change a typescript file it does not compile thus no restart