Skip to content

Commit

Permalink
fix([publish]): allow declare fields in ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnosphi committed Nov 29, 2021
1 parent 9067ab2 commit a08440b
Show file tree
Hide file tree
Showing 2 changed files with 1,455 additions and 1,453 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ module.exports = function preset(api, opts) {
presets: [
require('@babel/preset-react'),
[require('@babel/preset-env'), envConfig],
typeScript ? require('@babel/preset-typescript') : null
typeScript
? [require('@babel/preset-typescript'), {allowDeclareFields: true}]
: null
].filter(it => !!it),
plugins: [
require('@babel/plugin-transform-strict-mode'),
Expand Down
Loading

0 comments on commit a08440b

Please sign in to comment.