Update Babel config

This commit is contained in:
Pig Fang 2018-07-30 17:44:18 +08:00
parent 7985321022
commit b1faa99a90
3 changed files with 52 additions and 2 deletions

View File

@ -2,12 +2,19 @@
"presets": [
["@babel/env", {
"modules": false,
"useBuiltIns": "usage"
"useBuiltIns": false,
"loose": true
}]
],
"plugins": [
"@babel/syntax-dynamic-import",
"@babel/proposal-optional-catch-binding"
"@babel/proposal-optional-catch-binding",
["@babel/plugin-transform-runtime", {
"helpers": true,
"polyfill": false,
"regenerator": true,
"moduleName": "@babel/runtime"
}]
],
"env": {
"test": {

View File

@ -18,6 +18,7 @@
"postinstall": "rimraf node_modules/jest-runtime/node_modules/babel-core node_modules/jest-config/node_modules/babel-core"
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.55",
"admin-lte": "^2.4.2",
"axios": "^0.18.0",
"bootstrap": "^3.3.7",
@ -42,6 +43,7 @@
"@babel/core": "^7.0.0-beta.54",
"@babel/plugin-proposal-optional-catch-binding": "^7.0.0-beta.54",
"@babel/plugin-syntax-dynamic-import": "^7.0.0-beta.54",
"@babel/plugin-transform-runtime": "^7.0.0-beta.55",
"@babel/preset-env": "^7.0.0-beta.54",
"@types/jest": "^23.3.1",
"@types/jquery": "^3.3.5",

View File

@ -136,6 +136,13 @@
"@babel/types" "7.0.0-beta.54"
lodash "^4.17.5"
"@babel/helper-module-imports@7.0.0-beta.55":
version "7.0.0-beta.55"
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.55.tgz#93f927c6631d0689b8bbd1991d3fb2aa63eeb3f2"
dependencies:
"@babel/types" "7.0.0-beta.55"
lodash "^4.17.10"
"@babel/helper-module-transforms@7.0.0-beta.54":
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.54.tgz#8cc57eb0db5f0945d866524d555abd084e30cc35"
@ -157,6 +164,10 @@
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.54.tgz#61d2a9a0f9a3e31838a458debb9eebd7bdd249b4"
"@babel/helper-plugin-utils@7.0.0-beta.55":
version "7.0.0-beta.55"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.55.tgz#31f40777efd6b961da8496a923c22d2b062b3f73"
"@babel/helper-regex@7.0.0-beta.54":
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0-beta.54.tgz#8ac562f855f132fc68dfd10b132552555ac870d9"
@ -441,6 +452,13 @@
dependencies:
regenerator-transform "^0.13.3"
"@babel/plugin-transform-runtime@^7.0.0-beta.55":
version "7.0.0-beta.55"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.0.0-beta.55.tgz#f9bb5fab9372275d2a10c1e1261f4e99100c7dbe"
dependencies:
"@babel/helper-module-imports" "7.0.0-beta.55"
"@babel/helper-plugin-utils" "7.0.0-beta.55"
"@babel/plugin-transform-shorthand-properties@7.0.0-beta.54":
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0-beta.54.tgz#50e73c2afc5898b1055510ddf60ee13a6301517f"
@ -526,6 +544,13 @@
js-levenshtein "^1.1.3"
semver "^5.3.0"
"@babel/runtime@^7.0.0-beta.55":
version "7.0.0-beta.55"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0-beta.55.tgz#0bc33aa5a6ac0b012f37e25b9e6aaa2e489a916b"
dependencies:
core-js "^2.5.7"
regenerator-runtime "^0.12.0"
"@babel/template@7.0.0-beta.44":
version "7.0.0-beta.44"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f"
@ -589,6 +614,14 @@
lodash "^4.17.5"
to-fast-properties "^2.0.0"
"@babel/types@7.0.0-beta.55":
version "7.0.0-beta.55"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.55.tgz#7755c9d2e58315a64f05d8cf3322379be16d9199"
dependencies:
esutils "^2.0.2"
lodash "^4.17.10"
to-fast-properties "^2.0.0"
"@browserify/acorn5-object-spread@^5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@browserify/acorn5-object-spread/-/acorn5-object-spread-5.0.1.tgz#92e9b37f97beac9ec429a3cc479ded380297540c"
@ -2126,6 +2159,10 @@ core-js@^2.4.0, core-js@^2.5.0:
version "2.5.3"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e"
core-js@^2.5.7:
version "2.5.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e"
core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@ -6169,6 +6206,10 @@ regenerator-runtime@^0.11.0:
version "0.11.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
regenerator-runtime@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.0.tgz#8052ac952d85b10f3425192cd0c53f45cf65c6cb"
regenerator-transform@^0.13.3:
version "0.13.3"
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb"