Skip to content

Possible bug with ignore regex parsing? #22

@jt0dd

Description

@jt0dd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions