Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit b9bd74e

Browse files
committed
added transform-runtime plugin
1 parent 6f21d70 commit b9bd74e

File tree

4 files changed

+17
-25
lines changed

4 files changed

+17
-25
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
"devDependencies": {
5050
"@babel/cli": "^7.15.7",
5151
"@babel/core": "^7.15.5",
52+
"@babel/plugin-transform-runtime": "^7.15.0",
5253
"@babel/preset-env": "^7.15.6",
53-
"@babel/preset-typescript": "^7.15.0",
5454
"@changesets/cli": "^2.16.0",
5555
"@rollup/plugin-babel": "^5.3.0",
5656
"@rollup/plugin-node-resolve": "^13.0.4",

packages/babel.config.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
export default function getBabelConfig() {
33
return {
44
ignore: ['./node_modules'],
5-
presets: [
6-
'@babel/preset-env',
7-
'@babel/preset-typescript',
8-
],
9-
plugins: ['@babel/plugin-transform-typescript'],
5+
presets: ['@babel/preset-env'],
6+
// https://stackoverflow.com/questions/33527653/babel-6-regeneratorruntime-is-not-defined
7+
plugins: ['@babel/transform-runtime'],
108
};
119
}

packages/rollup.config.default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const fileExtensions = ['.ts'];
1414
function createBabelConfig() {
1515
// https://github.com/rollup/plugins/tree/master/packages/babel#running-babel-on-the-generated-code
1616
return babel({
17-
babelHelpers: 'bundled',
17+
babelHelpers: 'runtime',
1818
comments: false,
1919
extensions: fileExtensions, // https://github.com/rollup/rollup-plugin-babel/issues/255
2020
...getBabelConfig(),

yarn.lock

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,6 +1906,18 @@
19061906
resolve "^1.8.1"
19071907
semver "^5.5.1"
19081908

1909+
"@babel/plugin-transform-runtime@^7.15.0":
1910+
version "7.15.0"
1911+
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.15.0.tgz#d3aa650d11678ca76ce294071fda53d7804183b3"
1912+
integrity sha512-sfHYkLGjhzWTq6xsuQ01oEsUYjkHRux9fW1iUA68dC7Qd8BS1Unq4aZ8itmQp95zUzIcyR2EbNMTzAicFj+guw==
1913+
dependencies:
1914+
"@babel/helper-module-imports" "^7.14.5"
1915+
"@babel/helper-plugin-utils" "^7.14.5"
1916+
babel-plugin-polyfill-corejs2 "^0.2.2"
1917+
babel-plugin-polyfill-corejs3 "^0.2.2"
1918+
babel-plugin-polyfill-regenerator "^0.2.2"
1919+
semver "^6.3.0"
1920+
19091921
"@babel/plugin-transform-shorthand-properties@^7.12.1", "@babel/plugin-transform-shorthand-properties@^7.14.5":
19101922
version "7.14.5"
19111923
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz#97f13855f1409338d8cadcbaca670ad79e091a58"
@@ -1996,15 +2008,6 @@
19962008
"@babel/helper-plugin-utils" "^7.13.0"
19972009
"@babel/plugin-syntax-typescript" "^7.12.13"
19982010

1999-
"@babel/plugin-transform-typescript@^7.15.0":
2000-
version "7.15.4"
2001-
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.15.4.tgz#db7a062dcf8be5fc096bc0eeb40a13fbfa1fa251"
2002-
integrity sha512-sM1/FEjwYjXvMwu1PJStH11kJ154zd/lpY56NQJ5qH2D0mabMv1CAy/kdvS9RP4Xgfj9fBBA3JiSLdDHgXdzOA==
2003-
dependencies:
2004-
"@babel/helper-create-class-features-plugin" "^7.15.4"
2005-
"@babel/helper-plugin-utils" "^7.14.5"
2006-
"@babel/plugin-syntax-typescript" "^7.14.5"
2007-
20082011
"@babel/plugin-transform-unicode-escapes@^7.12.1", "@babel/plugin-transform-unicode-escapes@^7.14.5":
20092012
version "7.14.5"
20102013
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz#9d4bd2a681e3c5d7acf4f57fa9e51175d91d0c6b"
@@ -2406,15 +2409,6 @@
24062409
"@babel/helper-validator-option" "^7.12.17"
24072410
"@babel/plugin-transform-typescript" "^7.13.0"
24082411

2409-
"@babel/preset-typescript@^7.15.0":
2410-
version "7.15.0"
2411-
resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.15.0.tgz#e8fca638a1a0f64f14e1119f7fe4500277840945"
2412-
integrity sha512-lt0Y/8V3y06Wq/8H/u0WakrqciZ7Fz7mwPDHWUJAXlABL5hiUG42BNlRXiELNjeWjO5rWmnNKlx+yzJvxezHow==
2413-
dependencies:
2414-
"@babel/helper-plugin-utils" "^7.14.5"
2415-
"@babel/helper-validator-option" "^7.14.5"
2416-
"@babel/plugin-transform-typescript" "^7.15.0"
2417-
24182412
"@babel/register@^7.0.0":
24192413
version "7.13.16"
24202414
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.13.16.tgz#ae3ab0b55c8ec28763877383c454f01521d9a53d"

0 commit comments

Comments
 (0)