From 9b8eaff01334e9f4fc9af54db7efdf96e9e43797 Mon Sep 17 00:00:00 2001 From: johnny19941216 Date: Fri, 23 Oct 2020 16:46:06 +0800 Subject: [PATCH] fix(installer): fix babel runtime error (#849) --- web/installer/.babelrc | 42 ++++++---------------- web/installer/package-lock.json | 64 +++++++++++++-------------------- web/installer/package.json | 3 ++ 3 files changed, 38 insertions(+), 71 deletions(-) diff --git a/web/installer/.babelrc b/web/installer/.babelrc index b5941ff5e..08ea588e7 100644 --- a/web/installer/.babelrc +++ b/web/installer/.babelrc @@ -1,36 +1,14 @@ { "presets": [ - "@babel/preset-react" + "@babel/preset-react", + [ + "@babel/preset-env", + { + "modules": "commonjs" + } + ] ], "plugins": [ - "@babel/plugin-transform-member-expression-literals", - "@babel/plugin-transform-property-literals" - ], - "env": { - "development": { - "presets": [ - [ - "@babel/preset-env", - { - "loose": true, - "modules": "commonjs", - "exclude": [ - "babel-plugin-transform-async-to-generator", - "babel-plugin-transform-regenerator" - ] - } - ] - ], - "plugins": [ - [ - "react-hot-loader/babel" - ] - ] - }, - "production": { - "presets": [ - "@babel/preset-env" - ] - } - } -} + "@babel/plugin-transform-runtime" + ] +} \ No newline at end of file diff --git a/web/installer/package-lock.json b/web/installer/package-lock.json index 96adaeb07..826339248 100644 --- a/web/installer/package-lock.json +++ b/web/installer/package-lock.json @@ -1891,37 +1891,11 @@ "@babel/helper-remap-async-to-generator": "^7.12.1" }, "dependencies": { - "@babel/helper-module-imports": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-module-imports/download/@babel/helper-module-imports-7.12.1.tgz?cache=0&sync_timestamp=1602799917569&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-module-imports%2Fdownload%2F%40babel%2Fhelper-module-imports-7.12.1.tgz", - "integrity": "sha1-FkTAFZGhWi8ITdbQktlDDrHRIWw=", - "dev": true, - "requires": { - "@babel/types": "^7.12.1" - } - }, "@babel/helper-plugin-utils": { "version": "7.10.4", "resolved": "https://registry.npm.taobao.org/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.10.4.tgz?cache=0&sync_timestamp=1593522842472&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-plugin-utils%2Fdownload%2F%40babel%2Fhelper-plugin-utils-7.10.4.tgz", "integrity": "sha1-L3WoMSadT2d95JmG3/WZJ1M883U=", "dev": true - }, - "@babel/types": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.12.1.tgz?cache=0&sync_timestamp=1602799916513&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.12.1.tgz", - "integrity": "sha1-4QnZq5mo3nNb4ofuPWqZR6GQxK4=", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.19", - "to-fast-properties": "^2.0.0" - } - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.20.tgz", - "integrity": "sha1-tEqbYpe8tpjxxRo1RaKzs2jVnFI=", - "dev": true } } }, @@ -2625,6 +2599,26 @@ } } }, + "@babel/plugin-transform-runtime": { + "version": "7.12.1", + "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-runtime/download/@babel/plugin-transform-runtime-7.12.1.tgz", + "integrity": "sha1-BLeSBX60YDif9qQZjjd2FOoee6U=", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "resolve": "^1.8.1", + "semver": "^5.5.1" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npm.taobao.org/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.10.4.tgz?cache=0&sync_timestamp=1593522842472&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-plugin-utils%2Fdownload%2F%40babel%2Fhelper-plugin-utils-7.10.4.tgz", + "integrity": "sha1-L3WoMSadT2d95JmG3/WZJ1M883U=", + "dev": true + } + } + }, "@babel/plugin-transform-shorthand-properties": { "version": "7.12.1", "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-shorthand-properties/download/@babel/plugin-transform-shorthand-properties-7.12.1.tgz?cache=0&sync_timestamp=1602799951645&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-shorthand-properties%2Fdownload%2F%40babel%2Fplugin-transform-shorthand-properties-7.12.1.tgz", @@ -2998,18 +2992,11 @@ } }, "@babel/runtime": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.4.tgz", - "integrity": "sha512-r24eVUUr0QqNZa+qrImUk8fn5SPhHq+IfYvIoIMg0do3GdK9sMdiLKP3GYVVaxpPKORgm8KRKaNTEhAjgIpLMw==", + "version": "7.12.1", + "resolved": "https://registry.npm.taobao.org/@babel/runtime/download/@babel/runtime-7.12.1.tgz?cache=0&sync_timestamp=1602799933339&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fruntime%2Fdownload%2F%40babel%2Fruntime-7.12.1.tgz", + "integrity": "sha1-tBFqa2cR0BCy2tO3tuQ78bmVR0A=", "requires": { - "regenerator-runtime": "^0.13.2" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", - "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" - } + "regenerator-runtime": "^0.13.4" } }, "@babel/runtime-corejs2": { @@ -19810,8 +19797,7 @@ "regenerator-runtime": { "version": "0.13.7", "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.7.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.13.7.tgz", - "integrity": "sha1-ysLazIoepnX+qrrriugziYrkb1U=", - "dev": true + "integrity": "sha1-ysLazIoepnX+qrrriugziYrkb1U=" }, "regex-not": { "version": "1.0.2", diff --git a/web/installer/package.json b/web/installer/package.json index 0eaaa485c..516ec4ccb 100644 --- a/web/installer/package.json +++ b/web/installer/package.json @@ -19,6 +19,7 @@ "author": "", "license": "MIT", "dependencies": { + "@babel/runtime": "^7.12.1", "@types/jquery": "^3.3.31", "@types/node": "^12.7.4", "@vx/axis": "^0.0.183", @@ -70,8 +71,10 @@ "@babel/plugin-proposal-throw-expressions": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/plugin-syntax-import-meta": "^7.0.0", + "@babel/plugin-transform-async-to-generator": "^7.12.1", "@babel/plugin-transform-member-expression-literals": "^7.0.0", "@babel/plugin-transform-property-literals": "^7.0.0", + "@babel/plugin-transform-runtime": "^7.12.1", "@babel/polyfill": "^7.0.0", "@babel/preset-env": "^7.0.0", "@babel/preset-react": "^7.7.0",