Update js.ts

This commit is contained in:
Avad3 2024-07-13 20:49:29 -04:00 committed by GitHub
parent 47b59945a9
commit 738198f954
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,7 +63,7 @@ export function rewriteJs(js: string, origin?: URL) {
// js rweriting notrdone // js rweriting notrdone
MemberExpression: (node: ESTree.MemberExpression) => { MemberExpression: (node: ESTree.MemberExpression) => {
if (node.object.type === "Identifier" && identifierList.includes(node.object.name)) { if (node.object.type === "Identifier" && identifierList.includes(node.object.name)) {
node.object.name = `__s${node.object.name}`; node.object.name = `__s(${node.object.name})`;
} }
} }
}); });
@ -76,4 +76,4 @@ export function rewriteJs(js: string, origin?: URL) {
return js; return js;
} }
} }