Skip to content

Commit 2d0cd50

Browse files
committed
fix(babel): add typescript plugin for parse
1 parent f062f1d commit 2d0cd50

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/babel/src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ export default (): {
113113
}
114114

115115
path.node.body.unshift(
116-
...parse(statements.join('\n'), { sourceType: 'module' }).program
117-
.body,
116+
...parse(statements.join('\n'), {
117+
sourceType: 'module',
118+
plugins: ['typescript'],
119+
}).program.body,
118120
)
119121
},
120122
},

0 commit comments

Comments
 (0)