Skip to content

Commit 5b63cee

Browse files
committed
Fix: update babel targets to support Storybook 7.0
Storybook 7 changed its targets to modern browsers so it does not contain polyfills like runtimeGenerator etc. The addon now has to account for that in order to work properly in Storybook 7.0
1 parent a31679f commit 5b63cee

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.babelrc.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
module.exports = {
22
presets: [
3-
"@babel/preset-env",
3+
[
4+
"@babel/preset-env",
5+
{
6+
shippedProposals: true,
7+
useBuiltIns: "usage",
8+
corejs: "3",
9+
targets: { node: "14" },
10+
},
11+
],
412
"@babel/preset-typescript",
513
"@babel/preset-react",
614
],
@@ -10,7 +18,11 @@ module.exports = {
1018
[
1119
"@babel/preset-env",
1220
{
21+
shippedProposals: true,
22+
useBuiltIns: "usage",
23+
corejs: "3",
1324
modules: false,
25+
targets: { chrome: "100" },
1426
},
1527
],
1628
],

0 commit comments

Comments
 (0)