Skip to content

Commit

Permalink
Add bundle analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
the1812 committed Jan 24, 2022
1 parent 2dafe0d commit 05fd283
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ node_modules/
dev/
*.log
dist/stats.html
dist/profile.json
dist/bilibili-evolved.dev.user.js
builder/**/dist/
27 changes: 14 additions & 13 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,20 @@
"problemMatcher": [],
"label": "功能:监视插件 dev:watch-plugins"
},
// {
// "type": "shell",
// "command": "yarn webpack --config ./webpack/webpack.measure.js --progress",
// "problemMatcher": [],
// "label": "打包分析 dev:measure"
// },
// {
// "type": "shell",
// "command": "./dist/stats.html",
// "problemMatcher": [],
// "dependsOn": "打包分析 dev:measure",
// "label": "查看打包分析 dev:stats"
// },
{
"type": "shell",
"command": "yarn tsc -p tsconfig.type-check.json --noEmit",
"group": "build",
"problemMatcher": [],
"label": "生产:类型检查 prod:type"
},
{
"type": "shell",
"command": "yarn --silent webpack --config ./webpack/webpack.prod.js --profile --json > dist/profile.json && yarn webpack-bundle-analyzer dist/profile.json",
"group": "build",
"problemMatcher": [],
"label": "本体:打包分析 prod:analyze"
},
{
"type": "shell",
"command": "yarn eslint -f html -o dev/eslint.html --cache --cache-location node_modules/.cache/eslint/ 'src/**/*.@(js|ts|vue)' 'registry/lib/**/*.@(js|ts|vue)'",
Expand Down
2 changes: 1 addition & 1 deletion dist/bilibili-evolved.preview.user.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bilibili-evolved.user.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"vue-loader": "^15.8.3",
"vue-template-compiler": "^2.6.11",
"webpack": "^5.31.2",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.6.0"
},
"dependencies": {
Expand Down
14 changes: 0 additions & 14 deletions webpack/webpack.measure.js

This file was deleted.

73 changes: 72 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,11 @@
"@nodelib/fs.scandir" "2.1.3"
fastq "^1.6.0"

"@polka/url@^1.0.0-next.20":
version "1.0.0-next.21"
resolved "https://registry.npmmirror.com/@polka/url/download/@polka/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1"
integrity sha1-XeWiOFo1MJQn9gEZkrVEUU1VmqE=

"@popperjs/core@^2.6.0":
version "2.6.0"
resolved "https://registry.npm.taobao.org/@popperjs/core/download/@popperjs/core-2.6.0.tgz#f022195afdfc942e088ee2101285a1d31c7d727f"
Expand Down Expand Up @@ -1373,11 +1378,21 @@ acorn-jsx@^5.2.0:
resolved "https://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-5.3.1.tgz?cache=0&sync_timestamp=1599546317194&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn-jsx%2Fdownload%2Facorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
integrity sha1-/IZh4Rt6wVOcR9v+oucrOvNNJns=

acorn-walk@^8.0.0:
version "8.2.0"
resolved "https://registry.nlark.com/acorn-walk/download/acorn-walk-8.2.0.tgz?cache=0&sync_timestamp=1630916588767&other_urls=https%3A%2F%2Fregistry.nlark.com%2Facorn-walk%2Fdownload%2Facorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1"
integrity sha1-dBIQ8uJCZFRQiFOi9E0KuDt/acE=

acorn@^7.1.1, acorn@^7.4.0:
version "7.4.1"
resolved "https://registry.npm.taobao.org/acorn/download/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
integrity sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=

acorn@^8.0.4:
version "8.7.0"
resolved "https://registry.npmmirror.com/acorn/download/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf"
integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==

acorn@^8.2.1:
version "8.2.4"
resolved "https://registry.nlark.com/acorn/download/acorn-8.2.4.tgz?cache=0&sync_timestamp=1620134156200&other_urls=https%3A%2F%2Fregistry.nlark.com%2Facorn%2Fdownload%2Facorn-8.2.4.tgz#caba24b08185c3b56e3168e97d15ed17f4d31fd0"
Expand Down Expand Up @@ -1820,7 +1835,7 @@ commander@^4.1.1:
resolved "https://registry.npm.taobao.org/commander/download/commander-4.1.1.tgz?cache=0&sync_timestamp=1616364021418&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
integrity sha1-n9YCvZNilOnp70aj9NaWQESxgGg=

commander@^7.0.0:
commander@^7.0.0, commander@^7.2.0:
version "7.2.0"
resolved "https://registry.nlark.com/commander/download/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
integrity sha1-o2y1fQtQHOEI5NIFWaFQo5HZerc=
Expand Down Expand Up @@ -2109,6 +2124,11 @@ dot-case@^3.0.4:
no-case "^3.0.4"
tslib "^2.0.3"

duplexer@^0.1.2:
version "0.1.2"
resolved "https://registry.npm.taobao.org/duplexer/download/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6"
integrity sha1-Or5DrvODX4rgd9E23c4PJ2sEAOY=

electron-to-chromium@^1.3.571:
version "1.3.792"
resolved "https://registry.nlark.com/electron-to-chromium/download/electron-to-chromium-1.3.792.tgz#791b0d8fcf7411885d086193fb49aaef0c1594ca"
Expand Down Expand Up @@ -2692,6 +2712,13 @@ graceful-fs@^4.1.6:
resolved "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
integrity sha1-Ila94U02MpWMRl68ltxGfKB6Kfs=

gzip-size@^6.0.0:
version "6.0.0"
resolved "https://registry.npmmirror.com/gzip-size/download/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462"
integrity sha1-BlNn/VDCOcBnHLy61b4+LusQ5GI=
dependencies:
duplexer "^0.1.2"

has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
Expand Down Expand Up @@ -3293,6 +3320,11 @@ mkdirp@^0.5.1, mkdirp@^0.5.3:
dependencies:
minimist "^1.2.5"

mrmime@^1.0.0:
version "1.0.0"
resolved "https://registry.npmmirror.com/mrmime/download/mrmime-1.0.0.tgz#14d387f0585a5233d291baba339b063752a2398b"
integrity sha1-FNOH8FhaUjPSkbq6M5sGN1KiOYs=

[email protected]:
version "2.0.0"
resolved "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&sync_timestamp=1607433872491&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
Expand Down Expand Up @@ -3450,6 +3482,11 @@ onetime@^5.1.2:
dependencies:
mimic-fn "^2.1.0"

opener@^1.5.2:
version "1.5.2"
resolved "https://registry.nlark.com/opener/download/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598"
integrity sha1-XTfh81B3udysQwE3InGv3rKhNZg=

optionator@^0.9.1:
version "0.9.1"
resolved "https://registry.npm.taobao.org/optionator/download/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499"
Expand Down Expand Up @@ -4436,6 +4473,15 @@ simple-swizzle@^0.2.2:
dependencies:
is-arrayish "^0.3.1"

sirv@^1.0.7:
version "1.0.19"
resolved "https://registry.npmmirror.com/sirv/download/sirv-1.0.19.tgz#1d73979b38c7fe91fcba49c85280daa9c2363b49"
integrity sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ==
dependencies:
"@polka/url" "^1.0.0-next.20"
mrmime "^1.0.0"
totalist "^1.0.0"

slash@^3.0.0:
version "3.0.0"
resolved "https://registry.npm.taobao.org/slash/download/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
Expand Down Expand Up @@ -4755,6 +4801,11 @@ to-string-loader@^1.2.0:
dependencies:
loader-utils "^1.0.0"

totalist@^1.0.0:
version "1.1.0"
resolved "https://registry.npmmirror.com/totalist/download/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df"
integrity sha1-pNZaPlRlF3AePlw3pHpwrJf+Vt8=

tsconfig-paths@^3.9.0:
version "3.9.0"
resolved "https://registry.npm.taobao.org/tsconfig-paths/download/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b"
Expand Down Expand Up @@ -4952,6 +5003,21 @@ watchpack@^2.0.0:
glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2"

webpack-bundle-analyzer@^4.5.0:
version "4.5.0"
resolved "https://registry.npmmirror.com/webpack-bundle-analyzer/download/webpack-bundle-analyzer-4.5.0.tgz#1b0eea2947e73528754a6f9af3e91b2b6e0f79d5"
integrity sha512-GUMZlM3SKwS8Z+CKeIFx7CVoHn3dXFcUAjT/dcZQQmfSZGvitPfMob2ipjai7ovFFqPvTqkEZ/leL4O0YOdAYQ==
dependencies:
acorn "^8.0.4"
acorn-walk "^8.0.0"
chalk "^4.1.0"
commander "^7.2.0"
gzip-size "^6.0.0"
lodash "^4.17.20"
opener "^1.5.2"
sirv "^1.0.7"
ws "^7.3.1"

webpack-cli@^4.6.0:
version "4.7.0"
resolved "https://registry.nlark.com/webpack-cli/download/webpack-cli-4.7.0.tgz#3195a777f1f802ecda732f6c95d24c0004bc5a35"
Expand Down Expand Up @@ -5068,6 +5134,11 @@ [email protected]:
dependencies:
mkdirp "^0.5.1"

ws@^7.3.1:
version "7.5.6"
resolved "https://registry.npmmirror.com/ws/download/ws-7.5.6.tgz#e59fc509fb15ddfb65487ee9765c5a51dec5fe7b"
integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==

yallist@^2.1.2:
version "2.1.2"
resolved "https://registry.nlark.com/yallist/download/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
Expand Down

0 comments on commit 05fd283

Please sign in to comment.