Skip to content

Add vite file watcher ignore config

Thomas Hutterer requested to merge thutterer/vite-server-watch-ignore into master

What does this MR do and why?

This makes sure we only watch relevant files and avoids the "number of file watchers reached" issues seen on Linux systems.

Fixes #434329 (closed).

See https://v2.vitejs.dev/config/#server-watch for Vite's config options.

Screenshots or screen recordings

No changes.

How to set up and validate locally

The fixed #434329 (closed) didn't happen on MacOS (afaik) and probably not on all Linux systems, but when you already have some other heavy-file-watching tool running (like Ruby LSP), this was likely to happen on Linux.

Make sure Vite still works as expected and serves you all the JS you need, now maybe even a little faster than before

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thomas Hutterer

Merge request reports