mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 18:33:15 +00:00
Enable TanStack Start SPA mode so the build prerenders a static shell (/_shell.html) and emits a fully static bundle under .output/public, removing the Nitro serverless function from the Vercel deploy. The dashboard is a thin client (all data via client-side fetch to the FastAPI /dashboard/api/*), so SSR rendered nothing of value. Point Vercel at the static output and add a SPA catch-all rewrite to the shell for client-side routing, keeping the API proxy rewrite first.
23 lines
637 B
TypeScript
23 lines
637 B
TypeScript
import { defineConfig } from "vite"
|
|
import { devtools } from "@tanstack/devtools-vite"
|
|
import { tanstackStart } from "@tanstack/react-start/plugin/vite"
|
|
import viteReact from "@vitejs/plugin-react"
|
|
import viteTsConfigPaths from "vite-tsconfig-paths"
|
|
import tailwindcss from "@tailwindcss/vite"
|
|
import { nitro } from "nitro/vite"
|
|
|
|
const config = defineConfig({
|
|
plugins: [
|
|
devtools(),
|
|
nitro(),
|
|
// this is the plugin that enables path aliases
|
|
viteTsConfigPaths({
|
|
projects: ["./tsconfig.json"],
|
|
}),
|
|
tailwindcss(),
|
|
tanstackStart({ spa: { enabled: true } }),
|
|
viteReact(),
|
|
],
|
|
})
|
|
|
|
export default config
|