Skip to content

Commit 18fc674

Browse files
[CUTL-90] ⬆️ (Deps) Upgrade Babel and related libraries - add configurations for updated proposals, including optional chaining
1 parent 5af336e commit 18fc674

File tree

4 files changed

+10561
-11360
lines changed

4 files changed

+10561
-11360
lines changed

.storybook/.babelrc

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"presets": [
3+
["@babel/preset-env", { "modules": false, "shippedProposals": true, "loose": true }],
4+
"@babel/preset-react",
5+
"@babel/preset-flow"
6+
],
7+
"plugins": [
8+
"styled-components",
9+
["@babel/plugin-proposal-decorators", { "legacy": true }],
10+
["@babel/plugin-proposal-class-properties", { "loose": true }],
11+
["@babel/plugin-proposal-private-methods", { "loose": true }],
12+
"@babel/plugin-syntax-dynamic-import"
13+
],
14+
"env": {
15+
"production": {
16+
"only": ["app"],
17+
"plugins": [
18+
"lodash",
19+
"transform-react-remove-prop-types",
20+
"@babel/plugin-transform-react-inline-elements",
21+
"@babel/plugin-transform-react-constant-elements"
22+
]
23+
},
24+
"test": {
25+
"plugins": ["@babel/plugin-transform-modules-commonjs", "dynamic-import-node"]
26+
}
27+
}
28+
}

babel.config.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
module.exports = {
22
presets: [
3-
[
4-
'@babel/preset-env',
5-
{
6-
modules: false,
7-
},
8-
],
3+
['@babel/preset-env', { modules: false, shippedProposals: true, loose: true }],
94
'@babel/preset-react',
105
'@babel/preset-flow',
116
],

0 commit comments

Comments
 (0)