Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

vite.config.ts

30 lines675 Bytes

1import { defineConfig } from 'vite'
2import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
3import viteSolid from 'vite-plugin-solid'
4import tailwindcss from '@tailwindcss/vite'
5​
6export default defineConfig({
7 resolve: { tsconfigPaths: true },
8 server: {
9 port: 3000,
10 },
11 plugins: [
12 tailwindcss(),
13 tanstackStart({
14 spa: {
15 enabled: true,
16 prerender: {
17 outputPath: 'index.html',
18 crawlLinks: true,
19 },
20 },
21 pages: [
22 {
23 path: '/posts/1',
24 prerender: { enabled: true, outputPath: '/posts/1/index.html' },
25 },
26 ],
27 }),
28 viteSolid({ ssr: true }),
29 ],
30})