Skip to content

Commit 4d656cf

Browse files
authored
fix: keep var side‑effects for declare in fake JS (#68)
1 parent d0122c9 commit 4d656cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fake-js.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export function createFakeJsPlugin({
175175
t.numericLiteral(0),
176176
...deps.map((dep) => t.arrowFunctionExpression([], dep)),
177177
...(sideEffect
178-
? [t.callExpression(t.identifier('sideEffect'), [])]
178+
? [t.callExpression(t.identifier('sideEffect'), [bindings[0]])]
179179
: []),
180180
]
181181
const runtime: t.ArrayExpression = t.arrayExpression(elements)

0 commit comments

Comments
 (0)