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
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/1However, it doesn't work with your module, this fails to ignore directories other than
web/:I looked deeper into your code to see how you're using
chokidarand isolated a purechokidarexample and that seemed to create the same problem. Created an issue with them paulmillr/chokidar#1128