diff --git a/.gitignore b/.gitignore index c8f96d5f..0e0c6565 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ dist-ssr .env.dev phanpy-dist.zip phanpy-dist.tar.gz +sonda-report.html # Compiled locale files src/locales/*.js \ No newline at end of file diff --git a/package.json b/package.json index fa174292..006694b2 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "postcss": "~8.4.47", "postcss-dark-theme-class": "~1.3.0", "postcss-preset-env": "~10.0.8", + "sonda": "^0.5.0", "twitter-text": "~3.1.0", "vite": "~5.4.10", "vite-plugin-generate-file": "~0.2.0", diff --git a/vite.config.js b/vite.config.js index ed3dbc1d..d39a49f5 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,6 +4,7 @@ import { resolve } from 'path'; import { lingui } from '@lingui/vite-plugin'; import preact from '@preact/preset-vite'; +import { SondaRollupPlugin } from 'sonda'; import { uid } from 'uid/single'; import { defineConfig, loadEnv, splitVendorChunkPlugin } from 'vite'; import generateFile from 'vite-plugin-generate-file'; @@ -149,6 +150,10 @@ export default defineConfig({ type: 'module', }, }), + SondaRollupPlugin({ + detailed: true, + brotli: true, + }), ], build: { sourcemap: true,