Add some output

This commit is contained in:
yname 2024-08-17 06:24:10 -04:00
parent 96b093fcf5
commit f293cbd05f

View file

@ -104,13 +104,16 @@ async function rebuild() {
'sourcemap.json',
JSON.stringify(sourcemap, null, 2),
)
console.log('Sourcemap rebuilt.')
}
for (const root of SOURCE_ROOTS) {
fs.watch(root, { recursive: true }, () => {
console.log(`Detected change in ${root}, rebuilding sourcemap...`)
sourcemapCache.delete(root)
rebuild()
})
}
console.log('Rebuilding sourcemap...')
rebuild()