diff --git a/src/routes/(auth)/login/+page.svelte b/src/routes/(auth)/login/+page.svelte index 3adbfe1..5a5abbf 100644 --- a/src/routes/(auth)/login/+page.svelte +++ b/src/routes/(auth)/login/+page.svelte @@ -1,79 +1,87 @@
diff --git a/vite.config.ts b/vite.config.ts index d6d89f9..b1b29b6 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,56 +4,57 @@ import { VitePWA } from 'vite-plugin-pwa'; import tailwindcss from '@tailwindcss/vite'; export default defineConfig({ - server: { - proxy: { - '/api': { - target: process.env.VITE_API_URL ?? 'http://localhost:8000', - changeOrigin: true - } - } - }, - plugins: [ - tailwindcss(), - sveltekit(), - VitePWA({ - registerType: 'autoUpdate', - manifestFilename: 'manifest.json', - includeAssets: ['icons/icon.svg', 'icons/apple-touch-icon-180x180.png'], - devOptions: { enabled: true }, - manifest: { - name: 'Fooder', - short_name: 'Fooder', - description: 'Simple calorie and macro tracker', - theme_color: '#16a34a', - background_color: '#09090b', - display: 'standalone', - orientation: 'portrait', - start_url: '/diary/today', - id: '/', - categories: ['health', 'food'], - icons: [ - { src: '/icons/pwa-64x64.png', sizes: '64x64', type: 'image/png' }, - { src: '/icons/pwa-192x192.png', sizes: '192x192', type: 'image/png' }, - { src: '/icons/pwa-512x512.png', sizes: '512x512', type: 'image/png' }, - { src: '/icons/maskable-icon-512x512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' } - ] - }, - workbox: { - navigateFallback: '/index.html', - globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'], - runtimeCaching: [ - { - // Cache same-origin API responses (NetworkFirst: try network, fall back to cache) - urlPattern: ({ url }) => url.pathname.startsWith('/api/'), - handler: 'NetworkFirst', - options: { - cacheName: 'api-cache', - networkTimeoutSeconds: 5, - cacheableResponse: { statuses: [200] } - } - } - ] - } - }) - ] + server: { + proxy: { + '/api': { + target: process.env.VITE_API_URL ?? 'http://localhost:8000', + changeOrigin: true + } + } + }, + plugins: [ + tailwindcss(), + sveltekit(), + VitePWA({ + registerType: 'autoUpdate', + manifestFilename: 'manifest.json', + includeAssets: ['icons/icon.svg', 'icons/apple-touch-icon-180x180.png'], + devOptions: { enabled: true }, + manifest: { + name: 'Fooder', + short_name: 'Fooder', + description: 'Simple calorie and macro tracker', + theme_color: '#16a34a', + background_color: '#09090b', + display: 'standalone', + orientation: 'portrait', + start_url: '/diary/today', + scope: '/', + id: '/', + categories: ['health', 'food'], + icons: [ + { src: '/icons/pwa-64x64.png', sizes: '64x64', type: 'image/png' }, + { src: '/icons/pwa-192x192.png', sizes: '192x192', type: 'image/png' }, + { src: '/icons/pwa-512x512.png', sizes: '512x512', type: 'image/png' }, + { src: '/icons/maskable-icon-512x512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' } + ] + }, + workbox: { + navigateFallback: '/index.html', + globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'], + runtimeCaching: [ + { + // Cache same-origin API responses (NetworkFirst: try network, fall back to cache) + urlPattern: ({ url }) => url.pathname.startsWith('/api/'), + handler: 'NetworkFirst', + options: { + cacheName: 'api-cache', + networkTimeoutSeconds: 5, + cacheableResponse: { statuses: [200] } + } + } + ] + } + }) + ] });