add module bool and update oxc

This commit is contained in:
Toshit Chawda 2025-01-10 17:50:33 -08:00
parent 6b43c90831
commit 365284a1d4
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
6 changed files with 98 additions and 79 deletions

View file

@ -28,11 +28,18 @@ function rewriteJsWrapper(
const before = performance.now();
try {
if (typeof input === "string") {
out = rewrite_js(input, meta.base.href, source || "(unknown)", $scramjet);
out = rewrite_js(
input,
meta.base.href,
false,
source || "(unknown)",
$scramjet
);
} else {
out = rewrite_js_from_arraybuffer(
new Uint8Array(input),
meta.base.href,
false,
source || "(unknown)",
$scramjet
);