diff --git a/babel.config.js b/babel.config.js index 00a95caa15..7d651c5526 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,8 @@ module.exports = { sourceMaps: true, + assumptions: { + setPublicClassFields: true, + }, presets: [ [ "@babel/preset-env", @@ -10,19 +13,20 @@ module.exports = { "last 2 Safari versions", "last 2 Edge versions", ], + include: [ + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-class-properties", + ], }, ], - ["@babel/preset-typescript", { allowDeclareFields: true }], "@babel/preset-react", + ["@babel/preset-typescript", { allowDeclareFields: true }], ], plugins: [ - ["@babel/plugin-transform-typescript", { allowDeclareFields: true }], "@babel/plugin-proposal-export-default-from", "@babel/plugin-proposal-numeric-separator", - "@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-object-rest-spread", "@babel/plugin-proposal-optional-chaining", - "@babel/plugin-proposal-nullish-coalescing-operator", // transform logical assignment (??=, ||=, &&=). preset-env doesn't // normally bother with these (presumably because all the target