replace Start prerender with Vite SPA
This commit is contained in:
+2
-5
@@ -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(),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user