From f0cb655217d093a399b269bceb6cd84b7a5efc3c Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Tue, 12 Nov 2024 17:13:10 -0800 Subject: [PATCH] feat: Use modern babel config, removing transforms for ancient browsers --- babel.config.json | 17 ++++++++--------- package-lock.json | 2 -- package.json | 2 -- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/babel.config.json b/babel.config.json index df1f98598a..b2b1d8f24a 100644 --- a/babel.config.json +++ b/babel.config.json @@ -3,24 +3,23 @@ [ "@babel/preset-env", { - "modules": false + "modules": false, + "targets": "defaults" } ], - "@babel/preset-react", + ["@babel/preset-react", { "useSpread": true } ], "@babel/preset-typescript" ], - "plugins": [ - "@babel/plugin-proposal-object-rest-spread", - "@babel/plugin-proposal-class-properties" - ], "env": { "test": { - "plugins": ["@babel/plugin-proposal-class-properties"], "presets": [ [ - "@babel/preset-env" + "@babel/preset-env", + { + "targets": "defaults" + } ], - "@babel/preset-react", + ["@babel/preset-react", { "useSpread": true } ], "@babel/preset-typescript" ] } diff --git a/package-lock.json b/package-lock.json index 46613e952f..fc5e1a93dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,8 +53,6 @@ "@babel/cli": "^7.16.8", "@babel/core": "^7.17.8", "@babel/eslint-parser": "^7.18.2", - "@babel/plugin-proposal-class-properties": "^7.16.7", - "@babel/plugin-proposal-object-rest-spread": "^7.16.7", "@babel/preset-env": "^7.16.8", "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.16.7", diff --git a/package.json b/package.json index 4e8f977aa1..7223bed92f 100644 --- a/package.json +++ b/package.json @@ -90,8 +90,6 @@ "@babel/cli": "^7.16.8", "@babel/core": "^7.17.8", "@babel/eslint-parser": "^7.18.2", - "@babel/plugin-proposal-class-properties": "^7.16.7", - "@babel/plugin-proposal-object-rest-spread": "^7.16.7", "@babel/preset-env": "^7.16.8", "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.16.7",