Ignore .git and log which file changed
This commit is contained in:
parent
66cba49172
commit
7dcbd2130d
1 changed files with 5 additions and 2 deletions
|
@ -108,8 +108,11 @@ async function rebuild() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const root of SOURCE_ROOTS) {
|
for (const root of SOURCE_ROOTS) {
|
||||||
fs.watch(root, { recursive: true }, () => {
|
fs.watch(root, { recursive: true }, (_, file) => {
|
||||||
console.log(`Detected change in ${root}, rebuilding sourcemap...`)
|
if (file?.startsWith('.git/')) return
|
||||||
|
console.log(
|
||||||
|
`Detected change in ${root} -> ${file}; rebuilding sourcemap...`,
|
||||||
|
)
|
||||||
sourcemapCache.delete(root)
|
sourcemapCache.delete(root)
|
||||||
rebuild()
|
rebuild()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue