Open History to see the last commit
1import { defineConfig } from 'vite'
2import tsConfigPaths from 'vite-tsconfig-paths'
3import { tanstackStart } from '@tanstack/react-start/plugin/vite'
4import viteReact from '@vitejs/plugin-react'
5import { isSpaMode } from './tests/utils/isSpaMode'
6β
7const spaMode = isSpaMode
8β
9const spaModeConfiguration = {
10 enabled: true,
11 prerender: {
12 outputPath: 'index.html',
13 },
14}
15β
16export default defineConfig({
17 server: {
18 port: 3000,
19 },
20 plugins: [
21 tsConfigPaths({
22 projects: ['./tsconfig.json'],
23 }),
24 // @ts-ignore we want to keep one test with verboseFileRoutes off even though the option is hidden
25 tanstackStart({
26 spa: spaMode ? spaModeConfiguration : undefined,
27 }),
28 viteReact(),
29 ],
30})