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) {
|
||||
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()
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue