DenoDDeno
Powered by
.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 ...
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(".")
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
--watch
would also restart on file creation.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

API hooks during restart for deno run --watch
OhmOOhm / help
3y ago
`deno task dev` not working because `--watch` doesn't detect changes
samholmesSsamholmes / help
17mo ago