configure base path /tpf/ for subdirectory deployment, increase workbox cache limit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 11:49:01 +01:00
parent c31948b997
commit 8490154dde
4 changed files with 10 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
{ {
"name": "TherapyFinder", "name": "TherapyFinder",
"short_name": "TherapyFinder", "short_name": "TherapyFinder",
"start_url": "/", "start_url": "/tpf/",
"display": "standalone", "display": "standalone",
"background_color": "#ffffff", "background_color": "#ffffff",
"theme_color": "#09090b", "theme_color": "#09090b",

View File

@@ -3,9 +3,9 @@ set -euo pipefail
# Description: Build and deploy TherapyFinder to Uberspace static hosting # Description: Build and deploy TherapyFinder to Uberspace static hosting
# Usage: ./scripts/deploy.sh <ssh-host> # Usage: ./scripts/deploy.sh <ssh-host>
# Example: ./scripts/deploy.sh felixfoertsch@andromeda.uberspace.de # Example: ./scripts/deploy.sh serve
HOST="${1:?Usage: ./scripts/deploy.sh <ssh-host>}" HOST="${1:-serve}"
USER="$(ssh "$HOST" whoami)" USER="$(ssh "$HOST" whoami)"
REMOTE_DIR="/var/www/virtual/${USER}/html/tpf" REMOTE_DIR="/var/www/virtual/${USER}/html/tpf"

View File

@@ -1,14 +1,14 @@
import { RouterProvider, createRouter } from "@tanstack/react-router" import { createRouter, RouterProvider } from "@tanstack/react-router";
import { routeTree } from "./routeTree.gen" import { routeTree } from "./routeTree.gen";
const router = createRouter({ routeTree }) const router = createRouter({ routeTree, basepath: "/tpf" });
declare module "@tanstack/react-router" { declare module "@tanstack/react-router" {
interface Register { interface Register {
router: typeof router router: typeof router;
} }
} }
export function App() { export function App() {
return <RouterProvider router={router} /> return <RouterProvider router={router} />;
} }

View File

@@ -6,6 +6,7 @@ import { defineConfig } from "vite";
import { VitePWA } from "vite-plugin-pwa"; import { VitePWA } from "vite-plugin-pwa";
export default defineConfig({ export default defineConfig({
base: "/tpf/",
plugins: [ plugins: [
tanstackRouter(), tanstackRouter(),
react(), react(),
@@ -15,6 +16,7 @@ export default defineConfig({
includeAssets: ["icons/icon-192.png", "icons/icon-512.png"], includeAssets: ["icons/icon-192.png", "icons/icon-512.png"],
workbox: { workbox: {
globPatterns: ["**/*.{js,css,html,wasm,data}"], globPatterns: ["**/*.{js,css,html,wasm,data}"],
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
}, },
manifest: false, manifest: false,
}), }),