From 63ffb86ea718006998c749b33b9fee69ea6646ce Mon Sep 17 00:00:00 2001 From: Shantur Rathore Date: Tue, 10 Feb 2026 21:50:43 +0000 Subject: [PATCH] fix(ui): raise Workbox precache size limit --- packages/ui/vite.config.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/ui/vite.config.ts b/packages/ui/vite.config.ts index 599db05b..b7966f89 100644 --- a/packages/ui/vite.config.ts +++ b/packages/ui/vite.config.ts @@ -77,10 +77,13 @@ export default defineConfig({ theme_color: "#1a1a1a", }, workbox: { - // Preserve server-side auth redirects (e.g., /login) instead of serving cached index.html. - navigateFallback: null, - // Only precache static assets (avoid caching HTML documents / routes). - globPatterns: ["**/*.{js,css,png,jpg,jpeg,svg,webp,ico,woff,woff2,ttf,eot,json,webmanifest}"], + // Workbox defaults to 2 MiB; our main bundle can slightly exceed that. + // This is a build-time limit for the precache manifest, not a hard runtime cap. + maximumFileSizeToCacheInBytes: 3 * 1024 * 1024, + // Preserve server-side auth redirects (e.g., /login) instead of serving cached index.html. + navigateFallback: null, + // Only precache static assets (avoid caching HTML documents / routes). + globPatterns: ["**/*.{js,css,png,jpg,jpeg,svg,webp,ico,woff,woff2,ttf,eot,json,webmanifest}"], // Monaco assets can be large; cache them at runtime instead. globIgnores: [ "**/*.html",