diff --git a/.babelrc.js b/.babelrc.js index 34be60e17..75c4651d4 100644 --- a/.babelrc.js +++ b/.babelrc.js @@ -14,6 +14,7 @@ if (env === 'commonjs' || env === 'es') { plugins: [ '@babel/plugin-transform-runtime', '@babel/plugin-proposal-class-properties', + '@babel/plugin-transform-flow-comments', ['flow-react-proptypes', {deadCode: true, useESModules: true}], ['transform-react-remove-prop-types', {mode: 'wrap'}], ], diff --git a/package.json b/package.json index 34fd4f118..662d466c3 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "@babel/plugin-proposal-class-properties": "^7.7.0", "@babel/plugin-transform-modules-commonjs": "^7.7.0", "@babel/plugin-transform-runtime": "^7.6.2", + "@babel/plugin-transform-flow-comments": "^7.12.13", "@babel/polyfill": "^7.7.0", "@babel/preset-env": "^7.7.1", "@babel/preset-flow": "^7.0.0", diff --git a/yarn.lock b/yarn.lock index 98135a6c9..6d1a89801 100644 --- a/yarn.lock +++ b/yarn.lock @@ -45,6 +45,15 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/generator@^7.12.13": + version "7.13.16" + resolved "https://registry.nlark.com/@babel/generator/download/@babel/generator-7.13.16.tgz#0befc287031a201d84cdfc173b46b320ae472d14" + integrity sha1-C+/ChwMaIB2EzfwXO0azIK5HLRQ= + dependencies: + "@babel/types" "^7.13.16" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/generator@^7.4.0", "@babel/generator@^7.7.2": version "7.7.2" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.2.tgz#2f4852d04131a5e17ea4f6645488b5da66ebf3af" @@ -185,6 +194,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== +"@babel/helper-plugin-utils@^7.12.13": + version "7.13.0" + resolved "https://registry.npm.taobao.org/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.13.0.tgz#806526ce125aed03373bc416a828321e3a6a33af" + integrity sha1-gGUmzhJa7QM3O8QWqCgyHjpqM68= + "@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351" @@ -228,6 +242,11 @@ dependencies: "@babel/types" "^7.7.0" +"@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://registry.nlark.com/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha1-yaHwIZF9y1zPDU5FPjmQIpgfye0= + "@babel/helper-wrap-function@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.7.0.tgz#15af3d3e98f8417a60554acbb6c14e75e0b33b74" @@ -339,6 +358,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-flow@^7.12.13": + version "7.12.13" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-flow/download/@babel/plugin-syntax-flow-7.12.13.tgz#5df9962503c0a9c918381c929d51d4d6949e7e86" + integrity sha1-XfmWJQPAqckYOBySnVHU1pSefoY= + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + "@babel/plugin-syntax-flow@^7.2.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.7.0.tgz#5c9465bcd26354d5215294ea90ab1c706a571386" @@ -463,6 +489,15 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-transform-flow-comments@^7.12.13": + version "7.12.13" + resolved "https://registry.nlark.com/@babel/plugin-transform-flow-comments/download/@babel/plugin-transform-flow-comments-7.12.13.tgz#b6f0de89ac4955572913f4af82f6b8ddbff38bf1" + integrity sha1-tvDeiaxJVVcpE/Svgva43b/zi/E= + dependencies: + "@babel/generator" "^7.12.13" + "@babel/helper-plugin-utils" "^7.12.13" + "@babel/plugin-syntax-flow" "^7.12.13" + "@babel/plugin-transform-flow-strip-types@^7.0.0": version "7.6.3" 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 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.13.16": + version "7.13.17" + resolved "https://registry.nlark.com/@babel/types/download/@babel/types-7.13.17.tgz#48010a115c9fba7588b4437dd68c9469012b38b4" + integrity sha1-SAEKEVyfunWItEN91oyUaQErOLQ= + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + to-fast-properties "^2.0.0" + "@cnakazawa/watch@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef"