mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 06:20:02 -04:00
reorder params
This commit is contained in:
parent
3da0e1d816
commit
fbeaf15283
2 changed files with 4 additions and 5 deletions
|
@ -25,7 +25,7 @@ Error.stackTraceLimit = 50;
|
||||||
const decoder = new TextDecoder();
|
const decoder = new TextDecoder();
|
||||||
|
|
||||||
function rewriteJsWasm(
|
function rewriteJsWasm(
|
||||||
input: string | ArrayBuffer,
|
input: string | Uint8Array,
|
||||||
source: string | null,
|
source: string | null,
|
||||||
meta: URLMeta,
|
meta: URLMeta,
|
||||||
module: boolean
|
module: boolean
|
||||||
|
@ -41,16 +41,16 @@ function rewriteJsWasm(
|
||||||
out = rewrite_js(
|
out = rewrite_js(
|
||||||
input,
|
input,
|
||||||
meta.base.href,
|
meta.base.href,
|
||||||
module,
|
|
||||||
source || "(unknown)",
|
source || "(unknown)",
|
||||||
|
module,
|
||||||
$scramjet
|
$scramjet
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
out = rewrite_js_from_arraybuffer(
|
out = rewrite_js_from_arraybuffer(
|
||||||
new Uint8Array(input),
|
input,
|
||||||
meta.base.href,
|
meta.base.href,
|
||||||
module,
|
|
||||||
source || "(unknown)",
|
source || "(unknown)",
|
||||||
|
module,
|
||||||
$scramjet
|
$scramjet
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,7 +366,6 @@ async function rewriteBody(
|
||||||
workertype === "module"
|
workertype === "module"
|
||||||
);
|
);
|
||||||
if (flagEnabled("sourcemaps", meta.base) && map) {
|
if (flagEnabled("sourcemaps", meta.base) && map) {
|
||||||
console.log(js);
|
|
||||||
js =
|
js =
|
||||||
`${globalThis.$scramjet.config.globals.pushsourcemapfn}([${map.join(",")}], "${tag}");` +
|
`${globalThis.$scramjet.config.globals.pushsourcemapfn}([${map.join(",")}], "${tag}");` +
|
||||||
(js instanceof Uint8Array ? new TextDecoder().decode(js) : js);
|
(js instanceof Uint8Array ? new TextDecoder().decode(js) : js);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue