-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Open
Labels
p2-edge-caseBug, but has workaround or limited in scope (priority)Bug, but has workaround or limited in scope (priority)
Description
Describe the bug
The documentation for server.watch contains the following example:
server: {
watch: {
ignored: ['!**/node_modules/your-package-name/**']
}
},
This example does not work. It appears that the builtin **/node_modules/**
exclude causes chokidar to not even look in node_modules
despite the negation in the subdirectory.
It appears this was originally tested (see #5023 and #5239) with ignored: ['!**/node_modules/**']
. This does work, but in a real project will almost immediately result in Error: ENOSPC: System limit for number of file watchers reached
.
See paulmillr/chokidar#1225. I played with various chokidar options but I couldn't see a way to achieve this.
Reproduction
See chokidar issue.
System Info
System:
OS: Linux 5.4 Linux Mint 20.3 (Una)
CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
Memory: 4.20 GB / 15.56 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 16.15.1 - /usr/bin/node
npm: 8.1.1 - ~/npm/bin/npm
Browsers:
Chrome: 102.0.5005.61
Firefox: 101.0
npmPackages:
vite: ^2.9.12 => 2.9.12
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
ryzr, evbo, varmiral, MadLittleMods, nvh95 and 40 moreevbo, quyle92, pejalo, bilalmubarik, KyleAMathews and 4 more
Metadata
Metadata
Assignees
Labels
p2-edge-caseBug, but has workaround or limited in scope (priority)Bug, but has workaround or limited in scope (priority)