Compare commits
2 commits
be07bb510f
...
f293cbd05f
Author | SHA1 | Date | |
---|---|---|---|
f293cbd05f | |||
96b093fcf5 |
2 changed files with 4 additions and 4 deletions
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
|
@ -98,22 +98,22 @@ function mergeSourcemaps(sourcemaps: RojoSourcemap[]): RojoSourcemap {
|
|||
}
|
||||
|
||||
async function rebuild() {
|
||||
const sourcemaps = await Promise.all([
|
||||
getPrefixedSourcemap('Secret'),
|
||||
getPrefixedSourcemap('Core'),
|
||||
])
|
||||
const sourcemaps = await Promise.all(SOURCE_ROOTS.map(getPrefixedSourcemap))
|
||||
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()
|
||||
|
|
Loading…
Reference in a new issue