diff --git a/examples/browser/tools/package.json b/examples/browser/tools/package.json index 1aab108715..151c0f2cfd 100644 --- a/examples/browser/tools/package.json +++ b/examples/browser/tools/package.json @@ -16,6 +16,7 @@ }, "devDependencies": { "@preact/preset-vite": "^2.8.2", + "rollup-plugin-visualizer": "^5.12.0", "typescript": "^5.2.2", "vite": "^5.2.0" } diff --git a/examples/browser/tools/vite.config.ts b/examples/browser/tools/vite.config.ts index 619d4cf72d..51ed183417 100644 --- a/examples/browser/tools/vite.config.ts +++ b/examples/browser/tools/vite.config.ts @@ -1,8 +1,14 @@ import { defineConfig } from 'vite' import preact from '@preact/preset-vite' +import { visualizer } from 'rollup-plugin-visualizer' // https://vitejs.dev/config/ export default defineConfig({ - plugins: [preact()], + plugins: [ + preact(), + visualizer({ + filename: 'dist/stats.html', + }), + ], base: './', })