I am trying to run the node server by ts-node-dev and restart on any any changes in specific files. It is restarting on any changes made to ts,js files however, it is not restarting on changes to graphql files. Any suggestions?
"scripts": {
"start": "tsnd --transpile-only --rs ./src/microservices/index.ts --watch--extionsions
ts,js,graphql"
}
The syntax for --watch is different than nodemon and others that allow just a list of extensions. Here is more regex matching.
I also noticed you do not need to include the standard files it already watches. Based on the github issue where I found the solution you need to put --watch before the final entry point
In order to watch for .graphql files you need to add
--watch ./**/*.graphqlSo your example should be: