.armaan.s..
Denoβ€’2y agoβ€’
2 replies
.armaan.s.

--watch flag doesn't restart on file creation

How can I trigger Deno to restart when a new file is added? The deno run --watch ... command only seems to trigger when a file is modified or deleted but not when a new file is created.

My workaround currently is to use Deno.watchFs(".") to detect file creation and then modify an existing file which triggers the process to restart. This isn't ideal and it would be great if --watch would also restart on file creation.
Was this page helpful?