Skip to content

Commit fc5155b

Browse files
author
Emmanuel Ogbizi
committed
build: support null coalescing operator
1 parent 0567516 commit fc5155b

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.babelrc

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"devDependencies": {
8888
"@babel/cli": "^7.8.4",
8989
"@babel/core": "^7.9.0",
90+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
9091
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
9192
"@babel/preset-env": "^7.9.5",
9293
"@babel/preset-typescript": "^7.9.0",

webpack.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ const configuration: Configuration = {
1515
loader: "babel-loader",
1616
options: {
1717
presets: ["@babel/preset-typescript"],
18-
plugins: ["@babel/plugin-proposal-optional-chaining"],
18+
plugins: [
19+
"@babel/plugin-proposal-optional-chaining",
20+
"@babel/plugin-proposal-nullish-coalescing-operator",
21+
],
1922
},
2023
},
2124
},

0 commit comments

Comments
 (0)