mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-19 11:41:23 +02:00
PWA: - Switch to createOfflineFirstPWAConfig for offline-first PWA support - Configure with Picture branding (purple theme, German metadata) Replicate API timeouts: - Add AbortController-based timeouts to all 7 fetch calls - Create prediction: 30s, poll status: 60s, cancel: 10s, image fetch: 30s - Polling timeouts are non-fatal (logged as warning, retry continues) Batch service fix: - Join images table via leftJoin to return actual imageUrl - Previously always returned null (TODO comment) New endpoints: - GET /api/v1/generate/credits — returns credit balance, earned, spent - GET /api/v1/generate/history — paginated generation history with images Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
34 lines
873 B
TypeScript
34 lines
873 B
TypeScript
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import { defineConfig } from 'vite';
|
|
import { SvelteKitPWA } from '@vite-pwa/sveltekit';
|
|
import { createOfflineFirstPWAConfig } from '@manacore/shared-pwa';
|
|
import { MANACORE_SHARED_PACKAGES, getBuildDefines } from '@manacore/shared-vite-config';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
tailwindcss() as any,
|
|
sveltekit() as any,
|
|
SvelteKitPWA(
|
|
createOfflineFirstPWAConfig({
|
|
name: 'Picture - AI Bildgenerierung',
|
|
shortName: 'Picture',
|
|
description: 'KI-gestützte Bildgenerierung und -verwaltung',
|
|
themeColor: '#8b5cf6',
|
|
})
|
|
) as any,
|
|
],
|
|
server: {
|
|
port: 5175,
|
|
strictPort: true,
|
|
},
|
|
ssr: {
|
|
noExternal: [...MANACORE_SHARED_PACKAGES],
|
|
},
|
|
optimizeDeps: {
|
|
exclude: [...MANACORE_SHARED_PACKAGES],
|
|
},
|
|
define: {
|
|
...getBuildDefines(),
|
|
},
|
|
});
|