Files
tpf/vite.config.ts
Felix Förtsch 16de72c017 add settings page, contact editing, process flow, PWA updates
- settings tab with theme picker, data management, developer mode (mock data), PWA version/update
- contact detail page with inline editing of therapist info and contact attempts
- quick-action buttons on contact cards (update latest kontakt instead of creating duplicates)
- process stepper with inline step actions, Erstgespräch form embedded in step 1
- sticky bottom tab bar, Switch component, .htaccess in build output
- pre-warm PGlite on onboarding mount, spinner feedback on submit
- move DB init out of beforeLoad for faster initial page render
- bump to 2026.03.11.1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 13:08:48 +01:00

43 lines
1.1 KiB
TypeScript

import { execSync } from "node:child_process";
import { readFileSync } from "node:fs";
import path from "node:path";
import tailwindcss from "@tailwindcss/vite";
import tanstackRouter from "@tanstack/router-plugin/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { VitePWA } from "vite-plugin-pwa";
const pkg = JSON.parse(readFileSync("./package.json", "utf-8"));
const gitCount = execSync("git rev-list --count HEAD", {
encoding: "utf-8",
}).trim();
export default defineConfig({
base: "/tpf/",
define: {
__APP_VERSION__: JSON.stringify(`${pkg.version}+${gitCount}`),
},
plugins: [
tanstackRouter(),
react(),
tailwindcss(),
VitePWA({
registerType: "prompt",
includeAssets: ["icons/icon-192.png", "icons/icon-512.png"],
workbox: {
globPatterns: ["**/*.{js,css,html,wasm,data}"],
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
},
manifest: false,
}),
],
optimizeDeps: {
exclude: ["@electric-sql/pglite"],
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});