diff --git a/.gitignore b/.gitignore index 519e480..2715a90 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,6 @@ dist-ssr .history .local yarn.lock +# rollup-plugin-visualizer +stats.html diff --git a/package.json b/package.json index 5a6876f..e459617 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "mockjs": "^1.1.0", "postcss": "8.4.17", "prettier": "^2.7.1", + "rollup-plugin-visualizer": "^5.9.0", "stylelint": "^14.13.0", "stylelint-config-prettier": "^9.0.3", "stylelint-config-rational-order": "^0.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dbf7788..0d09158 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -135,6 +135,9 @@ devDependencies: prettier: specifier: ^2.7.1 version: registry.npmmirror.com/prettier@2.8.8 + rollup-plugin-visualizer: + specifier: ^5.9.0 + version: registry.npmmirror.com/rollup-plugin-visualizer@5.9.0 stylelint: specifier: ^14.13.0 version: registry.npmmirror.com/stylelint@14.16.1 @@ -8794,6 +8797,24 @@ packages: glob: registry.npmmirror.com/glob@7.2.3 dev: true + registry.npmmirror.com/rollup-plugin-visualizer@5.9.0: + resolution: {integrity: sha512-bbDOv47+Bw4C/cgs0czZqfm8L82xOZssk4ayZjG40y9zbXclNk7YikrZTDao6p7+HDiGxrN0b65SgZiVm9k1Cg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.9.0.tgz} + name: rollup-plugin-visualizer + version: 5.9.0 + engines: {node: '>=14'} + hasBin: true + peerDependencies: + rollup: 2.x || 3.x + peerDependenciesMeta: + rollup: + optional: true + dependencies: + open: registry.npmmirror.com/open@8.4.2 + picomatch: registry.npmmirror.com/picomatch@2.3.1 + source-map: registry.npmmirror.com/source-map@0.7.4 + yargs: registry.npmmirror.com/yargs@17.7.1 + dev: true + registry.npmmirror.com/rollup@2.79.1: resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rollup/-/rollup-2.79.1.tgz} name: rollup @@ -9151,6 +9172,13 @@ packages: version: 0.6.1 engines: {node: '>=0.10.0'} + registry.npmmirror.com/source-map@0.7.4: + resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/source-map/-/source-map-0.7.4.tgz} + name: source-map + version: 0.7.4 + engines: {node: '>= 8'} + dev: true + registry.npmmirror.com/sourcemap-codec@1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz} name: sourcemap-codec diff --git a/vite.config.ts b/vite.config.ts index 4ceda15..ff82f96 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,6 +4,7 @@ import vue from '@vitejs/plugin-vue'; import { viteMockServe } from 'vite-plugin-mock'; import VueDevTools from 'vite-plugin-vue-devtools'; import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'; +import { visualizer } from 'rollup-plugin-visualizer'; // https://vitejs.dev/config/ export default defineConfig(async ({ command }: ConfigEnv) => { @@ -23,6 +24,7 @@ export default defineConfig(async ({ command }: ConfigEnv) => { mockPath: 'mock', localEnabled: command === 'serve', }), + visualizer(), ], // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`