Skip to content

Commit

Permalink
feat: enable allowDeclareFields for babel transform (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed May 28, 2021
1 parent e6b8064 commit 914499c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/babel.ts
Expand Up @@ -19,7 +19,7 @@ export default function transform (opts: TransformOptions): TRANSFORM_RESULT {
}

if (opts.ts) {
_opts.plugins!.push(require('@babel/plugin-transform-typescript'))
_opts.plugins!.push(require('@babel/plugin-transform-typescript'), { allowDeclareFields: true })

This comment has been minimized.

Copy link
@IlyaSemenov

IlyaSemenov May 28, 2021

This should be:

_opts.plugins!.push([require('@babel/plugin-transform-typescript'), { allowDeclareFields: true }])

This comment has been minimized.

Copy link
@pi0

pi0 May 28, 2021

Author Member

7a1ae3b. fixed in 0.10.1

// `unshift` because this plugin must come before `@babel/plugin-syntax-class-properties`
_opts.plugins!.unshift([require('@babel/plugin-proposal-decorators'), { legacy: true }])
_opts.plugins!.push(require('babel-plugin-parameter-decorator'))
Expand Down

0 comments on commit 914499c

Please sign in to comment.