Open History to see the last commit
1import { defineConfig } from "vite";
2import react from "@vitejs/plugin-react";
3import { tanstackStart } from "@tanstack/react-start/plugin/vite";
4import { fileURLToPath } from "node:url";
5
6const fixture = process.env.JOL_PREVIEW_FIXTURE === "1";
7
8export default defineConfig({
9 publicDir: false,
10 build: { outDir: fixture ? "dist/web-fixture" : "dist/web" },
11 resolve: {
12 alias: fixture
13 ? [
14 {
15 find: "@neon/auth",
16 replacement: fileURLToPath(
17 new URL("./web/preview-auth.ts", import.meta.url),
18 ),
19 },
20 ]
21 : [],
22 },
23 plugins: [
24 tanstackStart({ srcDirectory: "web", spa: { enabled: true } }),
25 react(),
26 ],
27});