replace Start prerender with Vite SPA
CI / Typecheck, test & build (push) Successful in 3m54s
CI / Deploy to Cloudflare Workers (push) Successful in 1m51s

This commit is contained in:
2026-08-31 01:28:48 +08:00
parent 848de4e309
commit 6932906327
10 changed files with 58 additions and 513 deletions
+2 -5
View File
@@ -1,18 +1,15 @@
import { defineConfig } from 'vite'
import { devtools } from '@tanstack/devtools-vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import { tanstackRouter } from '@tanstack/router-plugin/vite'
import viteReact from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
// SPA mode: auth is Bearer-token client-side (localStorage), so route guards
// and data fetching must not run during SSR.
const config = defineConfig({
resolve: { tsconfigPaths: true },
plugins: [
devtools(),
tanstackStart({ spa: { enabled: true } }),
tanstackRouter({ target: 'react', autoCodeSplitting: true }),
tailwindcss(),
viteReact(),
],