- React + TanStack Router + shadcn/ui SPA under spa/ - serve spa/dist at /app/ with index.html fallback for client routing - Dockerfile: node build stage for SPA, copy dist into runtime image - README: document SPA, CORS_ORIGINS env var, architecture entry - vite base set to /app/, manifest.json paths fixed
20 lines
457 B
TypeScript
20 lines
457 B
TypeScript
import path from "path"
|
|
import { tanstackRouter } from "@tanstack/router-plugin/vite"
|
|
import tailwindcss from "@tailwindcss/vite"
|
|
import react from "@vitejs/plugin-react"
|
|
import { defineConfig } from "vite"
|
|
|
|
export default defineConfig({
|
|
base: "/app/",
|
|
plugins: [
|
|
tanstackRouter({ target: "react", autoCodeSplitting: true }),
|
|
react(),
|
|
tailwindcss(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
})
|