Skip to content

Commit 3692e0e

Browse files
authored
fix: babel tranform es error (#1651)
1 parent f8769f1 commit 3692e0e

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

.babelrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ if (env === 'commonjs' || env === 'es') {
1414
plugins: [
1515
'@babel/plugin-transform-runtime',
1616
'@babel/plugin-proposal-class-properties',
17+
'@babel/plugin-transform-flow-comments',
1718
['flow-react-proptypes', {deadCode: true, useESModules: true}],
1819
['transform-react-remove-prop-types', {mode: 'wrap'}],
1920
],

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"@babel/plugin-proposal-class-properties": "^7.7.0",
7777
"@babel/plugin-transform-modules-commonjs": "^7.7.0",
7878
"@babel/plugin-transform-runtime": "^7.6.2",
79+
"@babel/plugin-transform-flow-comments": "^7.12.13",
7980
"@babel/polyfill": "^7.7.0",
8081
"@babel/preset-env": "^7.7.1",
8182
"@babel/preset-flow": "^7.0.0",

yarn.lock

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@
4545
semver "^5.4.1"
4646
source-map "^0.5.0"
4747

48+
"@babel/generator@^7.12.13":
49+
version "7.13.16"
50+
resolved "https://registry.nlark.com/@babel/generator/download/@babel/generator-7.13.16.tgz#0befc287031a201d84cdfc173b46b320ae472d14"
51+
integrity sha1-C+/ChwMaIB2EzfwXO0azIK5HLRQ=
52+
dependencies:
53+
"@babel/types" "^7.13.16"
54+
jsesc "^2.5.1"
55+
source-map "^0.5.0"
56+
4857
"@babel/generator@^7.4.0", "@babel/generator@^7.7.2":
4958
version "7.7.2"
5059
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.2.tgz#2f4852d04131a5e17ea4f6645488b5da66ebf3af"
@@ -185,6 +194,11 @@
185194
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250"
186195
integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==
187196

197+
"@babel/helper-plugin-utils@^7.12.13":
198+
version "7.13.0"
199+
resolved "https://registry.npm.taobao.org/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.13.0.tgz#806526ce125aed03373bc416a828321e3a6a33af"
200+
integrity sha1-gGUmzhJa7QM3O8QWqCgyHjpqM68=
201+
188202
"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4":
189203
version "7.5.5"
190204
resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351"
@@ -228,6 +242,11 @@
228242
dependencies:
229243
"@babel/types" "^7.7.0"
230244

245+
"@babel/helper-validator-identifier@^7.12.11":
246+
version "7.12.11"
247+
resolved "https://registry.nlark.com/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed"
248+
integrity sha1-yaHwIZF9y1zPDU5FPjmQIpgfye0=
249+
231250
"@babel/helper-wrap-function@^7.7.0":
232251
version "7.7.0"
233252
resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.7.0.tgz#15af3d3e98f8417a60554acbb6c14e75e0b33b74"
@@ -339,6 +358,13 @@
339358
dependencies:
340359
"@babel/helper-plugin-utils" "^7.0.0"
341360

361+
"@babel/plugin-syntax-flow@^7.12.13":
362+
version "7.12.13"
363+
resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-flow/download/@babel/plugin-syntax-flow-7.12.13.tgz#5df9962503c0a9c918381c929d51d4d6949e7e86"
364+
integrity sha1-XfmWJQPAqckYOBySnVHU1pSefoY=
365+
dependencies:
366+
"@babel/helper-plugin-utils" "^7.12.13"
367+
342368
"@babel/plugin-syntax-flow@^7.2.0":
343369
version "7.7.0"
344370
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.7.0.tgz#5c9465bcd26354d5215294ea90ab1c706a571386"
@@ -463,6 +489,15 @@
463489
"@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0"
464490
"@babel/helper-plugin-utils" "^7.0.0"
465491

492+
"@babel/plugin-transform-flow-comments@^7.12.13":
493+
version "7.12.13"
494+
resolved "https://registry.nlark.com/@babel/plugin-transform-flow-comments/download/@babel/plugin-transform-flow-comments-7.12.13.tgz#b6f0de89ac4955572913f4af82f6b8ddbff38bf1"
495+
integrity sha1-tvDeiaxJVVcpE/Svgva43b/zi/E=
496+
dependencies:
497+
"@babel/generator" "^7.12.13"
498+
"@babel/helper-plugin-utils" "^7.12.13"
499+
"@babel/plugin-syntax-flow" "^7.12.13"
500+
466501
"@babel/plugin-transform-flow-strip-types@^7.0.0":
467502
version "7.6.3"
468503
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.6.3.tgz#8110f153e7360cfd5996eee68706cfad92d85256"
@@ -804,6 +839,14 @@
804839
lodash "^4.17.13"
805840
to-fast-properties "^2.0.0"
806841

842+
"@babel/types@^7.13.16":
843+
version "7.13.17"
844+
resolved "https://registry.nlark.com/@babel/types/download/@babel/types-7.13.17.tgz#48010a115c9fba7588b4437dd68c9469012b38b4"
845+
integrity sha1-SAEKEVyfunWItEN91oyUaQErOLQ=
846+
dependencies:
847+
"@babel/helper-validator-identifier" "^7.12.11"
848+
to-fast-properties "^2.0.0"
849+
807850
"@cnakazawa/watch@^1.0.3":
808851
version "1.0.3"
809852
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef"

0 commit comments

Comments
 (0)