Fix: ignore node_modules and .git in chokidar watcher to prevent ENOSPC error

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-29 11:30:14 +00:00
parent 4cda665886
commit a2d313fe1b

View File

@ -65,7 +65,11 @@ export default async (src: string = 'deps') => {
const source = path.join(config.rootPath, src); const source = path.join(config.rootPath, src);
const watcher = chokidar.watch(source, { const watcher = chokidar.watch(source, {
ignored: /(^|[\/\\])\../, // ignore dotfiles ignored: [
/(^|[\/\\])\../, // ignore dotfiles
'**/node_modules/**', // ignore node_modules
'**/.git/**', // ignore .git
],
persistent: true, persistent: true,
}); });