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

Possible bug with ignore regex parsing? #22

Open
jt0dd opened this issue Jul 10, 2021 · 1 comment
Open

Possible bug with ignore regex parsing? #22

jt0dd opened this issue Jul 10, 2021 · 1 comment

Comments

@jt0dd
Copy link

jt0dd commented Jul 10, 2021

I want to ignore changes to every directory except one. So I tried: /^(?!(web)).*/. It seems to work in theory, as tested here: https://regex101.com/r/W6WQkS/1

However, it doesn't work with your module, this fails to ignore directories other than web/:

try {
  require("electron-reloader")(module, { ignored: [/^(?!(web)).*/] });
} catch (_) {}
console.log('debug 1')
const { BrowserWindow, app } = require("electron");

I looked deeper into your code to see how you're using chokidar and isolated a pure chokidar example and that seemed to create the same problem. Created an issue with them paulmillr/chokidar#1128

@josevill
Copy link

Hi there, this is an old issue, yet I faced the same situation, happens that the prop to ignore files is ignore not ignored as stated in the main file of the lib.

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