nitro
nitro copied to clipboard
Plugins directory is not watched
Environment
nitro v2 node 22
Reproduction
https://stackblitz.com/edit/unjs-nitro-starter-e2qqum9j?file=.gitignore&title=Nitro%20Starter
- add the dir plugins in the server dir
Describe the bug
nitro doesn't reload in dev mode when a folder is being added into one of the scanDirs
Additional context
original issue https://github.com/nuxt/nuxt/issues/32425
Logs
We need to first make scanAndSyncOptions side-effect free (TODO in src)
Also we need to make a new (perhaps native) watcher instance watching top level scannable directories only for add/remove.