/** * Vite config for the UI component. * * Kazzle owns HOST/PORT (`kazzleAppVite`) and production PWA (`kazzleAppPwa`) * in `@kazzle/app/vite`. This template declares a backend `server` component, so * we pass its name plus the relative routes the browser calls; the helper * proxies them to the sibling component and refuses to serve until Kazzle has * injected the backend URL. Add new backend routes to `proxyPaths`. */ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import tailwindcss from '@tailwindcss/vite'; import { kazzleAppVite, kazzleAppPwa } from '@kazzle/app/vite'; export default defineConfig(({ command }) => ({ plugins: [react(), tailwindcss(), ...kazzleAppPwa()], ...kazzleAppVite(command, { apiComponent: 'server', proxyPaths: ['/categories', '/todos'] }), }));