From 413956e0a12fcc61c9adc97844884a50b48fc810 Mon Sep 17 00:00:00 2001 From: "shumeiko.it" Date: Sun, 1 Nov 2026 01:36:50 +0100 Subject: [PATCH] fix(web): ship fonts as files so the CSP lets them load Vite inlined the two smallest Hanken Grotesk and JetBrains Mono subsets as data: URLs. The sidecar and Tauri CSPs allow fonts from 'self' only, so the browser blocked them and those character ranges fell back to a system font. Fonts are now never inlined. --- apps/web/vite.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 7dbf78e..b0fa8d3 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -30,6 +30,9 @@ export default defineConfig(({ mode }) => ({ }, plugins: [react(), mode === "development" && componentTagger()].filter(Boolean), build: { + // Fonts stay separate files: the sidecar and Tauri CSPs allow fonts from + // 'self' only, so a small subset inlined as a data: URL would be blocked. + assetsInlineLimit: (filePath: string) => (/\.(?:woff2?|ttf|otf)$/.test(filePath) ? false : undefined), rollupOptions: { output: { // Split the heaviest independent vendor libraries out of the single