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",
"short_name": "TherapyFinder",
"start_url": "/",
"start_url": "/tpf/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#09090b",

View File

@@ -3,9 +3,9 @@ set -euo pipefail
# Description: Build and deploy TherapyFinder to Uberspace static hosting
# 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)"
REMOTE_DIR="/var/www/virtual/${USER}/html/tpf"

View File

@@ -1,14 +1,14 @@
import { RouterProvider, createRouter } from "@tanstack/react-router"
import { routeTree } from "./routeTree.gen"
import { createRouter, RouterProvider } from "@tanstack/react-router";
import { routeTree } from "./routeTree.gen";
const router = createRouter({ routeTree })
const router = createRouter({ routeTree, basepath: "/tpf" });
declare module "@tanstack/react-router" {
interface Register {
router: typeof router
router: typeof router;
}
}
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";
export default defineConfig({
base: "/tpf/",
plugins: [
tanstackRouter(),
react(),
@@ -15,6 +16,7 @@ export default defineConfig({
includeAssets: ["icons/icon-192.png", "icons/icon-512.png"],
workbox: {
globPatterns: ["**/*.{js,css,html,wasm,data}"],
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
},
manifest: false,
}),