-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Description
Description
Currently server.watch
option allows passing options to chokidar
. Docs state that the glob can be negated for a node_module
to be included, but it doesn't seem to be working for other files which were not previously excluded.
For example, I want to cause a plugin to be called whenever a file /config.json
is changed, because that plugin generates an in-memory new json
which the app consumes. Ideally that would trigger a reload, like when modifying vite.config.ts
.
Trying the following doesn't work, and because the included files are not part of the chokidar
options, it looks that there is no way to watch for additional files:
server: {
watch: {
ignored: ['!/config.json']
}
}
Suggested solution
Make the previous negated ignored globs functional or add a new include
options to server.watch
.
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.