build(projects): 添加构建大小可视化分析的插件
This commit is contained in:
parent
8e6b0b299d
commit
8ba8a4feac
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,3 +3,5 @@ node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
.idea
|
||||
stats.html
|
||||
|
@ -2,7 +2,8 @@ import WindiCSS from 'vite-plugin-windicss';
|
||||
import vue from './vue';
|
||||
import html from './html';
|
||||
import iconify from './iconify';
|
||||
import visualizer from './visualizer';
|
||||
|
||||
const plugins = [vue(), ...html, ...iconify, WindiCSS()];
|
||||
const plugins = [vue(), ...html, ...iconify, WindiCSS(), visualizer];
|
||||
|
||||
export default plugins;
|
||||
|
7
build/plugins/visualizer.ts
Normal file
7
build/plugins/visualizer.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { visualizer } from 'rollup-plugin-visualizer';
|
||||
|
||||
export default visualizer({
|
||||
open: true,
|
||||
gzipSize: true,
|
||||
brotliSize: true
|
||||
});
|
@ -66,6 +66,7 @@
|
||||
"patch-package": "^6.4.7",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"prettier": "^2.4.1",
|
||||
"rollup-plugin-visualizer": "^5.5.2",
|
||||
"sass": "^1.43.2",
|
||||
"typescript": "^4.4.4",
|
||||
"unplugin-icons": "^0.12.15",
|
||||
|
@ -45,6 +45,7 @@ specifiers:
|
||||
postinstall-postinstall: ^2.1.0
|
||||
prettier: ^2.4.1
|
||||
qs: ^6.10.1
|
||||
rollup-plugin-visualizer: ^5.5.2
|
||||
sass: ^1.43.2
|
||||
typescript: ^4.4.4
|
||||
unplugin-icons: ^0.12.15
|
||||
@ -107,6 +108,7 @@ devDependencies:
|
||||
patch-package: registry.nlark.com/patch-package/6.4.7
|
||||
postinstall-postinstall: registry.nlark.com/postinstall-postinstall/2.1.0
|
||||
prettier: registry.nlark.com/prettier/2.4.1
|
||||
rollup-plugin-visualizer: registry.nlark.com/rollup-plugin-visualizer/5.5.2
|
||||
sass: registry.npmmirror.com/sass/1.43.2
|
||||
typescript: registry.npmmirror.com/typescript/4.4.4
|
||||
unplugin-icons: registry.npmmirror.com/unplugin-icons/0.12.15_e14ef356e1d12d404481b7eb2ba1650f
|
||||
@ -1554,7 +1556,7 @@ packages:
|
||||
version: 7.0.4
|
||||
dependencies:
|
||||
string-width: registry.npmmirror.com/string-width/4.2.2
|
||||
strip-ansi: registry.npmmirror.com/strip-ansi/6.0.0
|
||||
strip-ansi: registry.npmmirror.com/strip-ansi/6.0.1
|
||||
wrap-ansi: registry.nlark.com/wrap-ansi/7.0.0
|
||||
dev: true
|
||||
|
||||
@ -2936,6 +2938,14 @@ packages:
|
||||
has-tostringtag: registry.nlark.com/has-tostringtag/1.0.0
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/is-docker/2.2.1:
|
||||
resolution: {integrity: sha1-M+6r4jz+hvFL3kQIoCwM+4U6zao=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-docker/download/is-docker-2.2.1.tgz}
|
||||
name: is-docker
|
||||
version: 2.2.1
|
||||
engines: {node: '>=8'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/is-expression/4.0.0:
|
||||
resolution: {integrity: sha1-wzFVliq/IdCv0lUlFNZ9LsFv0qs=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-expression/download/is-expression-4.0.0.tgz}
|
||||
name: is-expression
|
||||
@ -3066,7 +3076,7 @@ packages:
|
||||
version: 2.2.0
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
is-docker: 2.2.1
|
||||
is-docker: registry.nlark.com/is-docker/2.2.1
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/isexe/2.0.0:
|
||||
@ -4071,6 +4081,21 @@ packages:
|
||||
glob: registry.npmmirror.com/glob/7.1.7
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/rollup-plugin-visualizer/5.5.2:
|
||||
resolution: {integrity: sha1-riEw7lrkotkB52TkkrcTV8uV7tc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/rollup-plugin-visualizer/download/rollup-plugin-visualizer-5.5.2.tgz}
|
||||
name: rollup-plugin-visualizer
|
||||
version: 5.5.2
|
||||
engines: {node: '>=10.16'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
rollup: ^2.0.0
|
||||
dependencies:
|
||||
nanoid: registry.npmmirror.com/nanoid/3.1.29
|
||||
open: registry.npmmirror.com/open/7.4.2
|
||||
source-map: registry.nlark.com/source-map/0.7.3
|
||||
yargs: registry.npmmirror.com/yargs/16.2.0
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/run-parallel/1.2.0:
|
||||
resolution: {integrity: sha1-ZtE2jae9+SHrnZW9GpIp5/IaQ+4=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/run-parallel/download/run-parallel-1.2.0.tgz}
|
||||
name: run-parallel
|
||||
@ -4218,6 +4243,13 @@ packages:
|
||||
version: 0.6.1
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
registry.nlark.com/source-map/0.7.3:
|
||||
resolution: {integrity: sha1-UwL4FpAxc1ImVECS5kmB91F1A4M=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/source-map/download/source-map-0.7.3.tgz}
|
||||
name: source-map
|
||||
version: 0.7.3
|
||||
engines: {node: '>= 8'}
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/sourcemap-codec/1.4.8:
|
||||
resolution: {integrity: sha1-6oBL2UhXQC5pktBaOO8a41qatMQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/sourcemap-codec/download/sourcemap-codec-1.4.8.tgz}
|
||||
name: sourcemap-codec
|
||||
@ -6117,7 +6149,7 @@ packages:
|
||||
hasBin: true
|
||||
|
||||
registry.npmmirror.com/nanoid/3.1.29:
|
||||
resolution: {integrity: sha1-IU+y16M+GlvvR1e3ed+utqTlrrQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/nanoid/download/nanoid-3.1.29.tgz}
|
||||
resolution: {integrity: sha1-IU+y16M+GlvvR1e3ed+utqTlrrQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/nanoid/download/nanoid-3.1.29.tgz?cache=0&sync_timestamp=1634176297559&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fnanoid%2Fdownload%2Fnanoid-3.1.29.tgz}
|
||||
name: nanoid
|
||||
version: 3.1.29
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
@ -6144,6 +6176,16 @@ packages:
|
||||
es-abstract: registry.npmmirror.com/es-abstract/1.19.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/open/7.4.2:
|
||||
resolution: {integrity: sha1-uBR+Jtzz5CYxbHMAif1x7dKcIyE=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/open/download/open-7.4.2.tgz}
|
||||
name: open
|
||||
version: 7.4.2
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
is-docker: registry.nlark.com/is-docker/2.2.1
|
||||
is-wsl: registry.nlark.com/is-wsl/2.2.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/p-try/1.0.0:
|
||||
resolution: {integrity: sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/p-try/download/p-try-1.0.0.tgz?cache=0&sync_timestamp=1633367752239&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fp-try%2Fdownload%2Fp-try-1.0.0.tgz}
|
||||
name: p-try
|
||||
@ -6290,7 +6332,7 @@ packages:
|
||||
dependencies:
|
||||
emoji-regex: registry.npmmirror.com/emoji-regex/8.0.0
|
||||
is-fullwidth-code-point: registry.nlark.com/is-fullwidth-code-point/3.0.0
|
||||
strip-ansi: registry.npmmirror.com/strip-ansi/6.0.0
|
||||
strip-ansi: registry.npmmirror.com/strip-ansi/6.0.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/strip-ansi/6.0.0:
|
||||
@ -6427,6 +6469,13 @@ packages:
|
||||
rollup: ^2.50.0
|
||||
vite: ^2.3.0
|
||||
webpack: 4 || 5
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
vite:
|
||||
optional: true
|
||||
webpack:
|
||||
optional: true
|
||||
dependencies:
|
||||
vite: registry.npmmirror.com/vite/2.6.7_sass@1.43.2
|
||||
webpack-virtual-modules: registry.nlark.com/webpack-virtual-modules/0.4.3
|
||||
@ -6695,6 +6744,21 @@ packages:
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/yargs/16.2.0:
|
||||
resolution: {integrity: sha1-HIK/D2tqZur85+8w43b0mhJHf2Y=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/yargs/download/yargs-16.2.0.tgz}
|
||||
name: yargs
|
||||
version: 16.2.0
|
||||
engines: {node: '>=10'}
|
||||
dependencies:
|
||||
cliui: registry.nlark.com/cliui/7.0.4
|
||||
escalade: registry.nlark.com/escalade/3.1.1
|
||||
get-caller-file: registry.nlark.com/get-caller-file/2.0.5
|
||||
require-directory: registry.nlark.com/require-directory/2.1.1
|
||||
string-width: registry.npmmirror.com/string-width/4.2.2
|
||||
y18n: registry.nlark.com/y18n/5.0.8
|
||||
yargs-parser: registry.nlark.com/yargs-parser/20.2.9
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/yargs/17.1.1:
|
||||
resolution: {integrity: sha1-wqgJFWS9sZb3wKZ8HRLluFuAZ7o=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/yargs/download/yargs-17.1.1.tgz}
|
||||
name: yargs
|
||||
|
Loading…
Reference in New Issue
Block a user