Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove trailing forward slashes from exclusions #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rauaap
Copy link

@rauaap rauaap commented Jun 11, 2023

The exclusions are not set correctly and as a result the contents of node_modules will not get ignored, causing a huge amount of file watchers to be created.

This is because chokidar, which is used by livereload, appends string exclusions (other possible exclusions are globstrings and regular expressions) with "/**". Since our exclusions are .git/ and node_modules/ this results in the following exclusions in chokidar:

/path/to/project/node_modules//**
/path/to/project/.git//**

This pull request removes the trailing slashes so that the matching works in chokidar and the contents of the node_modules folder gets ignored.

As a side note the reason .git was ignored even with this problem present is because chokidar ignores .git by default.

fixes #128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENOSPC: System limit for number of file watchers reached
1 participant