# Conflicts:
#	yarn.lock
This commit is contained in:
万纯 2021-02-01 20:04:26 +08:00
commit 147fd2a5e1
5 changed files with 95 additions and 87 deletions

View File

@ -30,18 +30,18 @@
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@webank/eslint-config-webank": "0.2.7",
"@vuepress/plugin-docsearch": "^2.0.0-alpha.18",
"@vuepress/plugin-pwa": "^2.0.0-alpha.18",
"@vuepress/plugin-pwa-popup": "^2.0.0-alpha.18",
"@vuepress/theme-vue": "^2.0.0-alpha.18",
"@webank/eslint-config-webank": "^0.2.10",
"commitizen": "^4.2.1",
"cz-conventional-changelog": "^3.3.0",
"esbuild-loader": "^2.7.0",
"father-build": "^1.18.5",
"husky": "^4.3.0",
"lint-staged": "^10.4.0",
"esbuild-loader": "^2.7.0",
"vuepress": "^2.0.0-alpha.18",
"@vuepress/plugin-pwa": "^2.0.0-alpha.18",
"@vuepress/theme-vue": "^2.0.0-alpha.18",
"@vuepress/plugin-docsearch": "^2.0.0-alpha.18",
"@vuepress/plugin-pwa-popup": "^2.0.0-alpha.18"
"vuepress": "^2.0.0-alpha.18"
},
"lint-staged": {
"*.{js,jsx,vue,ts}": [

View File

@ -4,7 +4,6 @@ import { existsSync, readdirSync, readFileSync } from 'fs';
import { rimraf, chalk } from '@umijs/utils';
import zlib from 'zlib';
export async function getBundleAndConfigs({
api,
port
@ -92,7 +91,7 @@ export async function getBundleAndConfigs({
type: api.ApplyPluginsType.modify,
key: 'modifyBundleConfigs',
initialValue: [await getConfig({ type: 'csr' })].filter(
Boolean,
Boolean
),
args: {
...bundlerArgs,
@ -194,21 +193,21 @@ export function printFileSizes(stats, dir) {
`${makeRow(
chalk.cyan.bold('File'),
chalk.cyan.bold('Size'),
chalk.cyan.bold('Gzipped'),
chalk.cyan.bold('Gzipped')
)
}\n\n${
// eslint-disable-next-line
orderedAssets.map(asset => makeRow(/js$/.test(asset.name) ? (asset.suggested ? chalk.yellow(join(dir, asset.name)) : chalk.green(join(dir, asset.name))) : chalk.blue(join(dir, asset.name)),
filesize(asset.size),
getGzippedSize(asset),))
.join('\n')}`,
getGzippedSize(asset)))
.join('\n')}`
);
console.log(
`${ui.toString()}\n\n ${chalk.gray(
'Images and other types of assets omitted.',
)}\n`,
'Images and other types of assets omitted.'
)}\n`
);
if (orderedAssets?.some(asset => asset.suggested)) {
@ -216,17 +215,17 @@ export function printFileSizes(stats, dir) {
// TODO: use umi docs
console.log();
console.log(
chalk.yellow('The bundle size is significantly larger than recommended.'),
chalk.yellow('The bundle size is significantly larger than recommended.')
);
console.log(
chalk.yellow(
'Consider reducing it with code splitting: https://umijs.org/docs/load-on-demand',
),
'Consider reducing it with code splitting: https://umijs.org/docs/load-on-demand'
)
);
console.log(
chalk.yellow(
'You can also analyze the project dependencies using ANALYZE=1',
),
'You can also analyze the project dependencies using ANALYZE=1'
)
);
console.log();
}

View File

@ -41,7 +41,7 @@
},
"devDependencies": {
"@vue/compiler-sfc": "^3.0.0",
"@webank/eslint-config-webank": "0.2.7",
"@webank/eslint-config-webank": "^0.2.10",
"postcss-px-to-viewport": "1.1.1"
},
"dependencies": {

View File

@ -44,7 +44,7 @@
},
"devDependencies": {
"@vue/compiler-sfc": "^3.0.0",
"@webank/eslint-config-webank": "0.2.7"
"@webank/eslint-config-webank": "^0.2.10"
},
"dependencies": {
"@webank/fes": "^2.0.0-alpha.0",

141
yarn.lock
View File

@ -182,6 +182,28 @@
resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.1.tgz#d7386a689aa0ddf06255005b4b991988021101a0"
integrity sha512-725AQupWJZ8ba0jbKceeFblZTY90McUBWMwHhkFQ9q1zKPJ95GUktljFcgcsIVwRnTnRKlcYzfiNImg5G9m6ZQ==
"@babel/core@7.11.6":
version "7.11.6"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.6.tgz#3a9455dc7387ff1bac45770650bc13ba04a15651"
integrity sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg==
dependencies:
"@babel/code-frame" "^7.10.4"
"@babel/generator" "^7.11.6"
"@babel/helper-module-transforms" "^7.11.0"
"@babel/helpers" "^7.10.4"
"@babel/parser" "^7.11.5"
"@babel/template" "^7.10.4"
"@babel/traverse" "^7.11.5"
"@babel/types" "^7.11.5"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.1"
json5 "^2.1.2"
lodash "^4.17.19"
resolve "^1.3.2"
semver "^5.4.1"
source-map "^0.5.0"
"@babel/core@7.12.3", "@babel/core@^7.4.5":
version "7.12.3"
resolved "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz#1b436884e1e3bff6fb1328dc02b208759de92ad8"
@ -245,7 +267,7 @@
semver "^5.4.1"
source-map "^0.5.0"
"@babel/generator@^7.10.4", "@babel/generator@^7.11.5", "@babel/generator@^7.12.10", "@babel/generator@^7.12.11":
"@babel/generator@^7.10.4", "@babel/generator@^7.11.5", "@babel/generator@^7.11.6", "@babel/generator@^7.12.10", "@babel/generator@^7.12.11":
version "7.12.11"
resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af"
integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==
@ -427,7 +449,7 @@
dependencies:
"@babel/types" "^7.12.5"
"@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.4.4":
"@babel/helper-module-transforms@^7.11.0", "@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.4.4":
version "7.12.1"
resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c"
integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==
@ -538,6 +560,15 @@
"@babel/traverse" "^7.10.4"
"@babel/types" "^7.10.4"
"@babel/helpers@^7.10.4", "@babel/helpers@^7.12.5":
version "7.12.5"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e"
integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==
dependencies:
"@babel/template" "^7.10.4"
"@babel/traverse" "^7.12.5"
"@babel/types" "^7.12.5"
"@babel/helpers@^7.12.1", "@babel/helpers@^7.4.4":
version "7.12.1"
resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.1.tgz#8a8261c1d438ec18cb890434df4ec768734c1e79"
@ -547,15 +578,6 @@
"@babel/traverse" "^7.12.1"
"@babel/types" "^7.12.1"
"@babel/helpers@^7.12.5":
version "7.12.5"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e"
integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==
dependencies:
"@babel/template" "^7.10.4"
"@babel/traverse" "^7.12.5"
"@babel/types" "^7.12.5"
"@babel/highlight@^7.10.4":
version "7.10.4"
resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143"
@ -1923,7 +1945,7 @@
globals "^11.1.0"
lodash "^4.17.19"
"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5":
"@babel/traverse@^7.1.0", "@babel/traverse@^7.11.5", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5":
version "7.12.12"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376"
integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==
@ -4979,20 +5001,20 @@
ora "^5.1.0"
upath "^2.0.1"
"@webank/eslint-config-webank@0.2.7":
version "0.2.7"
resolved "https://registry.npmjs.org/@webank/eslint-config-webank/-/eslint-config-webank-0.2.7.tgz#b98efce44e1d799bd01e20a3371006fa8ecc5eae"
integrity sha512-yNMGEJuJ3D87excdD9xI8UxPVtqnfa5qle4TJt1DcXQwav5ssEb4cjjnvbIWK78SuENZvbN7KvPmS+UaYfujxQ==
"@webank/eslint-config-webank@^0.2.10":
version "0.2.10"
resolved "https://registry.yarnpkg.com/@webank/eslint-config-webank/-/eslint-config-webank-0.2.10.tgz#43538752a051abe8019933601aac097cb081938f"
integrity sha512-DAA71s0V+ib4dAL/w7Rj3FMUljcacgTKPNZWymv4YWkUwbHhWJApYlMw1d864MiPEg4PLQtaiAtHokERoEWOSQ==
dependencies:
babel-eslint "^10.0.2"
babel-eslint "^10.1.0"
confusing-browser-globals "^1.0.10"
eslint "^7.15.0"
eslint-plugin-angular "^4.0.1"
eslint-plugin-html "^6.1.1"
eslint-plugin-import "^2.18.2"
eslint-plugin-node "^11.1.0"
eslint-plugin-vue "^5.2.3"
vue-eslint-parser "^6.0.4"
eslint-plugin-vue "^7.5.0"
vue-eslint-parser "^7.4.1"
"@webassemblyjs/ast@1.11.0":
version "1.11.0"
@ -5333,7 +5355,7 @@ acorn-globals@^6.0.0:
acorn "^7.1.1"
acorn-walk "^7.1.1"
acorn-jsx@^5.0.0, acorn-jsx@^5.3.1:
acorn-jsx@^5.2.0, acorn-jsx@^5.3.1:
version "5.3.1"
resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==
@ -5348,7 +5370,7 @@ acorn-walk@^8.0.0:
resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.0.0.tgz#56ae4c0f434a45fff4a125e7ea95fa9c98f67a16"
integrity sha512-oZRad/3SMOI/pxbbmqyurIx7jHw1wZDcR9G44L8pUVFEomX/0dH89SrM1KaDXuv1NpzAXz6Op/Xu/Qd5XXzdEA==
acorn@^6.0.2, acorn@^6.0.7, acorn@^6.4.1:
acorn@^6.4.1:
version "6.4.2"
resolved "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6"
integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==
@ -5937,9 +5959,14 @@ axios@0.21.1:
dependencies:
follow-redirects "^1.10.0"
babel-eslint@^10.0.2:
babel-core@^7.0.0-bridge.0:
version "7.0.0-bridge.0"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==
babel-eslint@^10.1.0:
version "10.1.0"
resolved "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232"
integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==
dependencies:
"@babel/code-frame" "^7.0.0"
@ -8846,14 +8873,17 @@ eslint-plugin-node@^11.1.0:
resolve "^1.10.1"
semver "^6.1.0"
eslint-plugin-vue@^5.2.3:
version "5.2.3"
resolved "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-5.2.3.tgz#3ee7597d823b5478804b2feba9863b1b74273961"
integrity sha512-mGwMqbbJf0+VvpGR5Lllq0PMxvTdrZ/ZPjmhkacrCHbubJeJOt+T6E3HUzAifa2Mxi7RSdJfC9HFpOeSYVMMIw==
eslint-plugin-vue@^7.5.0:
version "7.5.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-7.5.0.tgz#cc6d983eb22781fa2440a7573cf39af439bb5725"
integrity sha512-QnMMTcyV8PLxBz7QQNAwISSEs6LYk2LJvGlxalXvpCtfKnqo7qcY0aZTIxPe8QOnHd7WCwiMZLOJzg6A03T0Gw==
dependencies:
vue-eslint-parser "^5.0.0"
eslint-utils "^2.1.0"
natural-compare "^1.4.0"
semver "^7.3.2"
vue-eslint-parser "^7.4.1"
eslint-scope@^4.0.0, eslint-scope@^4.0.3:
eslint-scope@^4.0.3:
version "4.0.3"
resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848"
integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==
@ -8861,7 +8891,7 @@ eslint-scope@^4.0.0, eslint-scope@^4.0.3:
esrecurse "^4.1.0"
estraverse "^4.1.1"
eslint-scope@^5.1.1:
eslint-scope@^5.0.0, eslint-scope@^5.1.1:
version "5.1.1"
resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
@ -8929,23 +8959,14 @@ eslint@^7.15.0:
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
espree@^4.1.0:
version "4.1.0"
resolved "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz#728d5451e0fd156c04384a7ad89ed51ff54eb25f"
integrity sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==
espree@^6.2.1:
version "6.2.1"
resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a"
integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==
dependencies:
acorn "^6.0.2"
acorn-jsx "^5.0.0"
eslint-visitor-keys "^1.0.0"
espree@^5.0.0:
version "5.0.1"
resolved "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a"
integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==
dependencies:
acorn "^6.0.7"
acorn-jsx "^5.0.0"
eslint-visitor-keys "^1.0.0"
acorn "^7.1.1"
acorn-jsx "^5.2.0"
eslint-visitor-keys "^1.1.0"
espree@^7.3.0, espree@^7.3.1:
version "7.3.1"
@ -18464,29 +18485,17 @@ vm-browserify@^1.0.1:
resolved "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
vue-eslint-parser@^5.0.0:
version "5.0.0"
resolved "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz#00f4e4da94ec974b821a26ff0ed0f7a78402b8a1"
integrity sha512-JlHVZwBBTNVvzmifwjpZYn0oPWH2SgWv5dojlZBsrhablDu95VFD+hriB1rQGwbD+bms6g+rAFhQHk6+NyiS6g==
dependencies:
debug "^4.1.0"
eslint-scope "^4.0.0"
eslint-visitor-keys "^1.0.0"
espree "^4.1.0"
esquery "^1.0.1"
lodash "^4.17.11"
vue-eslint-parser@^6.0.4:
version "6.0.5"
resolved "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-6.0.5.tgz#c1c067c2755748e28f3872cd42e8c1c4c1a8059f"
integrity sha512-Bvjlx7rH1Ulvus56KHeLXOjEi3JMOYTa1GAqZr9lBQhd8weK8mV7U7V2l85yokBZEWHJQjLn6X3nosY8TzkOKg==
vue-eslint-parser@^7.4.1:
version "7.4.1"
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.4.1.tgz#e4adcf7876a7379758d9056a72235af18a587f92"
integrity sha512-AFvhdxpFvliYq1xt/biNBslTHE/zbEvSnr1qfHA/KxRIpErmEDrQZlQnvEexednRHmLfDNOMuDYwZL5xkLzIXQ==
dependencies:
debug "^4.1.1"
eslint-scope "^4.0.0"
eslint-visitor-keys "^1.0.0"
espree "^5.0.0"
eslint-scope "^5.0.0"
eslint-visitor-keys "^1.1.0"
espree "^6.2.1"
esquery "^1.0.1"
lodash "^4.17.11"
lodash "^4.17.15"
vue-i18n@^9.0.0-beta.15:
version "9.0.0-beta.15"