Description Current Behavior:
Server doesn't reload when .env file changes
New files added to src directory don't trigger reload
Only existing TypeScript files are watched
Expected Behavior:
Server should restart when any relevant file changes:
.env file modifications
New TypeScript files added to src
Changes in imported modules
Proposed Solutions:
Option A: Use Nodemon
npm install nodemon --save-dev
Update dev script:
"dev" : " nodemon --watch src --watch .env src/index.ts -x 'tsx'"
Pros: Industry standard, reliable watching
Cons: Adds dependency
Option B: Enhance TSX Watch
"dev" : " tsx watch --watch-path src --watch-path .env src/index.ts"
Pros: No new dependencies
Cons: Less mature watching implementation
Technical Notes:
Both solutions require testing edge cases:
Adding new files to watched directories
Changing environment variables
Modifying imported modules
Consider long-term maintenance and DX
Reactions are currently unavailable
You can’t perform that action at this time.
Current Behavior:
.envfile changessrcdirectory don't trigger reloadExpected Behavior:
.envfile modificationssrcProposed Solutions:
Option A: Use Nodemon
Update
devscript:Pros: Industry standard, reliable watching
Cons: Adds dependency
Option B: Enhance TSX Watch
Pros: No new dependencies
Cons: Less mature watching implementation
Technical Notes: