From 5d4981e38421de915f956f4bd991df4a57e4ff1c Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 14 Jun 2024 10:51:48 +1000 Subject: [PATCH] docs: add bundle report to tools page --- examples/browser/tools/package.json | 1 + examples/browser/tools/vite.config.ts | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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: './', })