Skip to content

Commit 005a408

Browse files
committed
Replace @babel/preset-env with individual plug-ins like @babel/plugin-transform-optional-chaining
1 parent 6af997b commit 005a408

File tree

3 files changed

+126
-1042
lines changed

3 files changed

+126
-1042
lines changed

babel.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
module.exports = {
2-
presets: ["@babel/preset-typescript", "@babel/preset-env"],
2+
plugins: [
3+
"@babel/plugin-transform-nullish-coalescing-operator",
4+
"@babel/plugin-transform-optional-chaining",
5+
],
6+
presets: ["@babel/preset-typescript"],
37
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"@babel/runtime": "^7.12.5"
4444
},
4545
"devDependencies": {
46-
"@babel/preset-env": "^7.22.4",
46+
"@babel/plugin-transform-nullish-coalescing-operator": "^7.22.5",
47+
"@babel/plugin-transform-optional-chaining": "^7.22.5",
4748
"@babel/preset-typescript": "^7.21.5",
4849
"@preconstruct/cli": "^2.7.0",
4950
"@types/jest": "^26.0.15",

0 commit comments

Comments
 (0)