-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
45 lines (43 loc) · 1.31 KB
/
Copy pathvite.config.ts
File metadata and controls
45 lines (43 loc) · 1.31 KB
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
38
39
40
41
42
43
44
45
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite-plus";
import { prerenderPages } from "./prerender.config.ts";
export default defineConfig({
fmt: {
ignorePatterns: [".agents/**", "convex/_generated/**", "src/routeTree.gen.ts"],
},
lint: {
ignorePatterns: [".agents/**", "convex/_generated/**", "src/routeTree.gen.ts"],
options: { typeAware: true },
},
plugins: [
tailwindcss(),
tanstackStart({
pages: prerenderPages.map((page) => ({
path: page.path,
prerender: page.prerender,
})),
prerender: {
autoStaticPathsDiscovery: false,
crawlLinks: false,
enabled: true,
},
spa: {
enabled: true,
// Cloudflare SPA mode serves /index.html for unknown app routes.
// TanStack Start defaults the SPA shell to /_shell.html, so emit it
// here instead. The hash marker keeps the shell request on the public
// root route while staying distinct from the explicit / prerender entry.
maskPath: "/#__spa-shell",
prerender: {
outputPath: "/index.html",
},
},
}),
react(),
],
staged: {
"*": "vp check --fix",
},
});