Ignore .git and log which file changed

This commit is contained in:
yname 2024-08-18 19:48:41 -04:00
parent 66cba49172
commit 7dcbd2130d

View file

@ -108,8 +108,11 @@ async function rebuild() {
}
for (const root of SOURCE_ROOTS) {
fs.watch(root, { recursive: true }, () => {
console.log(`Detected change in ${root}, rebuilding sourcemap...`)
fs.watch(root, { recursive: true }, (_, file) => {
if (file?.startsWith('.git/')) return
console.log(
`Detected change in ${root} -> ${file}; rebuilding sourcemap...`,
)
sourcemapCache.delete(root)
rebuild()
})