Skip to content

Commit

Permalink
refactor: use built-in babel plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
kcmr committed Jun 26, 2024
1 parent 129c35f commit 3eb3d96
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ export function transform(code: string) {
parser: {
parse(code: string) {
return parseSync(code, {
plugins: [
require('@babel/plugin-syntax-jsx'),
[require('@babel/plugin-syntax-typescript'), { isTSX: true }],
[require('@babel/plugin-proposal-decorators'), { legacy: true }],
],
parserOpts: {
tokens: true,
plugins: [
'jsx',
'typescript',
'decorators-legacy',
'classProperties',
],
},
});
},
Expand Down

0 comments on commit 3eb3d96

Please sign in to comment.