Skip to content

Commit 4c044be

Browse files
salvoravidatay1orjoneskodiakhq[bot]
authored
chore(react): use babel runtime on es builds (#9833)
* chore(react): use babel runtime on es builds * Update package.json * chore: update lockfile * chore(react): use babel runtime on es5 builds Co-authored-by: Taylor Jones <taylor.jones826@gmail.com> Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 7fe81b5 commit 4c044be

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

packages/react/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"react-dom": "^16.8.6 || ^17.0.1"
4747
},
4848
"dependencies": {
49+
"@babel/runtime": "^7.14.6",
4950
"@carbon/feature-flags": "^0.6.0",
5051
"@carbon/icons-react": "^10.41.0",
5152
"@carbon/telemetry": "0.0.0-alpha.6",

packages/react/scripts/env.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ const docgenConfig = {
1414
};
1515

1616
module.exports = () => ({
17+
plugins:
18+
BABEL_ENV === 'es' || BABEL_ENV === 'cjs'
19+
? ['@babel/plugin-transform-runtime']
20+
: undefined,
1721
presets: [
1822
[
1923
require.resolve('@babel/preset-env'),

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10308,6 +10308,7 @@ __metadata:
1030810308
"@babel/plugin-transform-object-assign": ^7.14.5
1030910309
"@babel/preset-env": ^7.14.7
1031010310
"@babel/preset-react": ^7.14.5
10311+
"@babel/runtime": ^7.14.6
1031110312
"@carbon/feature-flags": ^0.6.0
1031210313
"@carbon/icons-react": ^10.41.0
1031310314
"@carbon/telemetry": 0.0.0-alpha.6

0 commit comments

Comments
 (0)