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

Allow configuring 'ignore:' option for the Listen gem #38

Open
grncdr opened this issue Aug 16, 2024 · 1 comment
Open

Allow configuring 'ignore:' option for the Listen gem #38

grncdr opened this issue Aug 16, 2024 · 1 comment

Comments

@grncdr
Copy link

grncdr commented Aug 16, 2024

This code that sets up a listener is hardcoded to the Rails root.

https://github.com/railsjazz/rails_live_reload/blob/e089d818de02e8b10d94848ecfe09d4e8aad58a6/lib/rails_live_reload/watcher.rb#L28C1-L39C8

That's fine, but in my project there are some other folders that should not be watched because it causes a lot of CPU usage for the Listen gem. It would be nice if the configuration allowed adding ignore patterns like this:

config.ignore /^\./
config.ignore /node_modules/
@dymk
Copy link

dymk commented Jan 3, 2025

+1 to this. In addition to watching too many files, it will simply crash if Listen encounters a subdirectory not related to the configured watch paths of RLR which it does not have permission to list the contents of.

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

No branches or pull requests

2 participants