Geekuillaume
besson.co
Geekuillaume
@besson.co
You're using the NodeJS --watch mode and want to also trigger a reload when a specific non-imported file changes (like a JSON config file)? Here's how to do so:

process.env.WATCH_REPORT_DEPENDENCIES && process.send?.({'watch:import': [url.pathToFileURL("your_file_path")]})
September 28, 2025 at 4:01 PM