Skip to content

Commit

Permalink
fix(babel-preset): add missing class-properties for .tsx?
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Oct 9, 2019
1 parent a7ff523 commit 0c949f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/babel-preset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ module.exports = declare(
legacy: true,
},
],
[
'@babel/plugin-proposal-class-properties',
{
loose: true,
},
],
],
},
].concat(
Expand Down
4 changes: 4 additions & 0 deletions tests/test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React from 'react'

export default class Test extends React.PureComponent {
static a = 1

b?: string

render() {
return <div>Hello</div>
}
Expand Down

0 comments on commit 0c949f2

Please sign in to comment.