moonwave
moonwave copied to clipboard
Filewatcher watches node_modules and other directories it doesn't need to
Need to add this line to the dev.ts
chokidar
.watch(projectDir, {
ignored: (file) => (file.includes("node_modules") || file.includes(".git")),
ignoreInitial: true,
})
To have it ignore other modules that aren't needed to be watched, otherwise you can get an error like this
node:internal/fs/watchers:207
const error = new UVException({
^
Error: EMFILE: too many open files, watch
at FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
Emitted 'error' event on FSWatcher instance at: