Skip to content

Commit

Permalink
Revert "[core] Remove outdated babel proposal plugins (#36795)" (#37331)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak authored May 19, 2023
1 parent eaadfd5 commit 092b06a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ module.exports = function getBabelConfig(api) {
},
],
'babel-plugin-optimize-clsx',
// Need the following 3 proposals for all targets in .browserslistrc.
// With our usage the transpiled loose mode is equivalent to spec mode.
['@babel/plugin-proposal-class-properties', { loose: true }],
['@babel/plugin-proposal-private-methods', { loose: true }],
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
['@babel/plugin-proposal-object-rest-spread', { loose: true }],
[
'@babel/plugin-transform-runtime',
{
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
"@babel/cli": "^7.21.0",
"@babel/core": "^7.21.4",
"@babel/node": "^7.20.7",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/plugin-transform-object-assign": "^7.18.6",
"@babel/plugin-transform-react-constant-elements": "^7.21.3",
"@babel/plugin-transform-runtime": "^7.21.4",
Expand Down Expand Up @@ -208,6 +210,11 @@
"resolutions": {
"**/@babel/core": "^7.21.4",
"**/@babel/code-frame": "^7.21.4",
"**/@babel/plugin-proposal-class-properties": "^7.18.6",
"**/@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"**/@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"**/@babel/plugin-proposal-numeric-separator": "^7.18.6",
"**/@babel/plugin-proposal-optional-chaining": "^7.21.0",
"**/@babel/plugin-transform-destructuring": "npm:@minh.nguyen/plugin-transform-destructuring@^7.5.2",
"**/@babel/plugin-transform-runtime": "^7.21.4",
"**/@babel/preset-env": "^7.21.4",
Expand Down

0 comments on commit 092b06a

Please sign in to comment.