-
-
Couldn't load subscription status.
- Fork 7.4k
Labels
Description
Describe the bug
vite/packages/vite/src/node/utils.ts
Line 757 in a3d8918
| !file.startsWith(withTrailingSlash(root)) && |
Whilst investigating Yarn PnP issues, I noticed that ensureWatchedFile is sometimes called with windows paths, and sometimes with posix paths.
When called with windows paths, this line is guaranteed to return true (as root is always a posix path) and so some files may be unnecessarily added to the watcher.
Reproduction
vite/packages/vite/src/node/utils.ts
Line 757 in a3d8918
| !file.startsWith(withTrailingSlash(root)) && |
Steps to reproduce
No response
System Info
-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 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.