fix scrammaps

This commit is contained in:
Toshit Chawda 2025-03-06 20:06:27 -08:00
parent e8ff38b2e5
commit f15cf568c1
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
4 changed files with 103 additions and 78 deletions

View file

@ -62,7 +62,14 @@ function rewriteJsWrapper(
return input;
}
const after = performance.now();
const { js, errors, duration } = out;
const { js, map, scramtag, errors, duration } = out;
if ((flagEnabled("sourcemaps", meta.base), !globalThis.clients)) {
globalThis[globalThis.$scramjet.config.globals.pushsourcemapfn](
Array.from(map),
scramtag
);
}
if (flagEnabled("rewriterLogs", meta.base)) {
for (const error of errors) {