spb/zyquo-cloud-web Public MIT
Zyquo Cloud Web — every cloud model, one beautiful chat, entirely in your browser.
TypeScript 81.9%
CSS 8.9%
JavaScript 7.5%
Shell 1.1%
HTML 0.6%
1/*2 * vite.config.ts3 * Zyquo Cloud Web4 *5 * Author: Simon-Pierre Boucher6 * Mail: contact@spboucher.ai7 */89import { defineConfig } from 'vite'10import react from '@vitejs/plugin-react'11import { VitePWA } from 'vite-plugin-pwa'1213export default defineConfig({14 // Overridable for subpath hosting (e.g. GitHub Pages sets VITE_BASE=/zyquo-cloud-web/).15 base: process.env.VITE_BASE ?? '/',16 plugins: [17 react(),18 VitePWA({19 registerType: 'autoUpdate',20 // The service worker precaches the app shell only (index + main bundle +21 // icons) — NEVER provider API responses or anything containing keys or22 // conversation content. Lazy chunks (mermaid, katex fonts) are cached at23 // runtime on first use, same-origin only.24 workbox: {25 globPatterns: [26 'index.html',27 'registerSW.js',28 'manifest.webmanifest',29 'assets/index-*.js',30 'assets/index-*.css',31 'icons/*.{svg,png}',32 ],33 navigateFallback: 'index.html',34 runtimeCaching: [35 {36 // Same-origin lazy assets only (providers are never under /assets/,37 // and runtime caching applies to GET requests only).38 urlPattern: /\/assets\/.+\.(js|css|woff2)$/,39 handler: 'CacheFirst',40 options: {41 cacheName: 'zyquo-shell-lazy',42 expiration: { maxEntries: 200, maxAgeSeconds: 60 * 60 * 24 * 90 },43 },44 },45 ],46 },47 manifest: {48 name: 'Zyquo Cloud',49 short_name: 'Zyquo Cloud',50 description:51 'Multi-provider AI chat that lives entirely in your browser — your keys, your history, no backend.',52 start_url: '/',53 display: 'standalone',54 background_color: '#FAFBFD',55 theme_color: '#FAFBFD',56 // Relative to the manifest's location so subpath deploys keep working.57 icons: [58 { src: 'icons/icon-192.png', sizes: '192x192', type: 'image/png' },59 { src: 'icons/icon-512.png', sizes: '512x512', type: 'image/png' },60 {61 src: 'icons/icon-512-maskable.png',62 sizes: '512x512',63 type: 'image/png',64 purpose: 'maskable',65 },66 ],67 },68 }),69 ],70 build: {71 target: 'es2022',72 sourcemap: false,73 },74})75