1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38import tailwindcss from "@tailwindcss/vite";
import { devtools } from "@tanstack/devtools-vite";
import { nitroV2Plugin } from "@tanstack/nitro-v2-vite-plugin";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import viteReact from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import viteTsConfigPaths from "vite-tsconfig-paths";
export default defineConfig({
plugins: [
devtools(),
viteTsConfigPaths({
projects: ["./tsconfig.json"],
}),
tailwindcss(),
tanstackStart({
router: {
routeToken: "layout",
},
srcDirectory: "src",
start: { entry: "./start.tsx" },
server: { entry: "./server.ts" },
}),
nitroV2Plugin({ preset: "vercel", compatibilityDate: "2025-10-27" }),
viteReact({
babel: {
plugins: ["babel-plugin-react-compiler"],
},
}),
],
optimizeDeps: {
include: ["@hugeicons/react"],
},
server: {
port: 5173,
},
});