Skip to content

Commit 7e169ed

Browse files
committed
fix: filter out ExpressionStatement
closes #93
1 parent 6a25d49 commit 7e169ed

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/fake-js.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ export function createFakeJsPlugin({
275275
program.body = program.body
276276
.map((node) => {
277277
if (isHelperImport(node)) return null
278+
if (node.type === 'ExpressionStatement') return null
278279

279280
const newNode = patchImportExport(node, typeOnlyIds, cjsDefault)
280281
if (newNode) {

0 commit comments

Comments
 (0)