Skip to content

Commit

Permalink
Update babel config to transpile nullish-coalescing-operator (#1034)
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon authored Oct 31, 2022
1 parent 144b8db commit 627e732
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
33 changes: 33 additions & 0 deletions package/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"browsers": [
">1%",
"last 2 chrome versions",
"last 2 edge versions",
"last 2 firefox versions",
"last 2 safari versions",
"not dead",
"not ie <= 11",
"not op_mini all",
"not android <= 4.4",
"not samsung <= 4"
],
"node": "16"
},
"useBuiltIns": false,
"modules": false
}
],
"@babel/preset-react",
"@babel/preset-typescript",
"@babel/preset-flow"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-nullish-coalescing-operator"
]
}
10 changes: 8 additions & 2 deletions package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"typescript": "4.8.3"
},
"dependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"canvaskit-wasm": "0.36.1",
"react-reconciler": "^0.27.0"
},
Expand All @@ -103,8 +104,13 @@
"output": "lib",
"targets": [
"commonjs",
"module",
[
"module",
{
"configFile": "./.babelrc"
}
],
"typescript"
]
}
}
}

0 comments on commit 627e732

Please sign in to comment.