-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
29 lines (27 loc) · 906 Bytes
/
Copy pathvite.config.ts
File metadata and controls
29 lines (27 loc) · 906 Bytes
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
// TanStack Start build config.
//
// Default target is Lovable's Cloudflare Workers host so the published
// `*.lovable.app` site keeps building (Lovable's CI expects a `dist/`
// directory from the cloudflare preset).
//
// To build for Vercel, set NITRO_PRESET=vercel at build time:
// NITRO_PRESET=vercel bun run build
// That emits Vercel Build Output API v3 artifacts under `.vercel/output/`.
import { defineConfig } from "@lovable.dev/vite-tanstack-config";
const preset = process.env.NITRO_PRESET ?? "cloudflare-module";
export default defineConfig({
tanstackStart: {
server: { entry: "server" },
},
nitro:
preset === "vercel"
? {
preset: "vercel",
output: {
dir: ".vercel/output",
serverDir: ".vercel/output/functions/__server.func",
publicDir: ".vercel/output/static",
},
}
: { preset },
});