Compare commits

..

No commits in common. "f293cbd05f6f75b6260d8b5d5a2f1a8f03f7cf9a" and "be07bb510f89bf77560f57dc53278d91602d90ba" have entirely different histories.

2 changed files with 4 additions and 4 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -98,22 +98,22 @@ function mergeSourcemaps(sourcemaps: RojoSourcemap[]): RojoSourcemap {
}
async function rebuild() {
const sourcemaps = await Promise.all(SOURCE_ROOTS.map(getPrefixedSourcemap))
const sourcemaps = await Promise.all([
getPrefixedSourcemap('Secret'),
getPrefixedSourcemap('Core'),
])
const sourcemap = mergeSourcemaps(sourcemaps)
await fs.promises.writeFile(
'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()