We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69908d0 commit 7f39580Copy full SHA for 7f39580
src/shared/rewriters/js.ts
@@ -97,8 +97,11 @@ function rewriteJsInner(
97
) {
98
if (flagEnabled("naiiveRewriter", meta.origin)) {
99
const text = typeof js === "string" ? js : new TextDecoder().decode(js);
100
+ let out: any = rewriteJsNaiive(text);
101
+ if (typeof js === "string") out = out;
102
+ else out = new TextEncoder().encode(out);
103
- return { js: rewriteJsNaiive(text), tag: "", map: null };
104
+ return { js: out, tag: "", map: null };
105
}
106
107
return rewriteJsWasm(js, url, meta, module);
0 commit comments