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

Commit 0610f65

Browse files
authored
perf: Use babel-plugin-transform-runtime to reduce size (#129)
1 parent d6da618 commit 0610f65

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"presets": [["env", { "modules": false }], "stage-1", "react"],
3-
"plugins": ["transform-class-properties"],
3+
"plugins": ["transform-class-properties", "transform-runtime"],
44
"env": {
55
"test": {
66
"presets": ["env", "stage-1", "react"]

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"react-dom": "0.14.x || ^15.0.0 || ^16.0.0"
5959
},
6060
"dependencies": {
61+
"babel-runtime": "6.x.x",
6162
"create-react-context": "^0.2.1",
6263
"popper.js": "^1.14.1",
6364
"warning": "^3.0.0"
@@ -71,6 +72,7 @@
7172
"babel-plugin-external-helpers": "^6.22.0",
7273
"babel-plugin-transform-class-properties": "^6.24.1",
7374
"babel-plugin-transform-react-remove-prop-types": "^0.4.13",
75+
"babel-plugin-transform-runtime": "^6.23.0",
7476
"babel-preset-env": "^1.6.1",
7577
"babel-preset-react": "^6.24.1",
7678
"babel-preset-stage-1": "^6.24.1",

yarn.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,12 @@ babel-plugin-transform-remove-undefined@^0.3.0:
10661066
dependencies:
10671067
babel-helper-evaluate-path "^0.3.0"
10681068

1069+
babel-plugin-transform-runtime@^6.23.0:
1070+
version "6.23.0"
1071+
resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee"
1072+
dependencies:
1073+
babel-runtime "^6.22.0"
1074+
10691075
babel-plugin-transform-simplify-comparison-operators@^6.9.0:
10701076
version "6.9.0"
10711077
resolved "https://registry.yarnpkg.com/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.0.tgz#586252fea023cb13f2400a09c0ab178dc0844f0a"
@@ -1215,7 +1221,7 @@ babel-register@^6.26.0:
12151221
mkdirp "^0.5.1"
12161222
source-map-support "^0.4.15"
12171223

1218-
babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
1224+
babel-runtime@6.x.x, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
12191225
version "6.26.0"
12201226
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
12211227
dependencies:

0 commit comments

Comments
 (0)