-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
19 lines (17 loc) · 923 Bytes
/
Copy pathvite.config.ts
File metadata and controls
19 lines (17 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// @lovable.dev/vite-tanstack-config already includes tanstackStart, viteReact,
// tailwindcss, tsConfigPaths, nitro (build-only), componentTagger (dev-only),
// VITE_* env injection, @ path alias, React/TanStack dedupe, error logger
// plugins, and sandbox detection. Do not add those plugins manually.
import { defineConfig } from "@lovable.dev/vite-tanstack-config";
// On Vercel CI the `VERCEL` env var is set — pin the nitro preset to "vercel"
// so the build emits a Vercel-compatible output. Inside the Lovable sandbox
// this is ignored (Cloudflare is forced). Locally, `nitro: true` force-enables
// the deploy plugin (default would skip it outside Lovable).
const isVercel = !!process.env.VERCEL;
export default defineConfig({
tanstackStart: {
// Redirect TanStack Start's bundled server entry to src/server.ts.
server: { entry: "server" },
},
nitro: isVercel ? { preset: "vercel" } : true,
});