-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.config.js
43 lines (42 loc) · 1.19 KB
/
app.config.js
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
import { createApp } from "vinxi";
import reactRefresh from "@vitejs/plugin-react";
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
import tsConfigPaths from "vite-tsconfig-paths";
export default createApp({
server: {
preset: "koyeb", // needed for docker support
experimental: {
asyncContext: true,
}
},
routers: [
{
type: "static",
name: "public",
dir: "./public",
},
{
type: "http",
name: "trpc",
base: "/trpc",
handler: "./server/trpc.handler.ts",
target: "server",
plugins: () => [reactRefresh(), tsConfigPaths()],
},
{
type: "spa",
name: "client",
handler: "./index.html",
target: "browser",
plugins: () => [
TanStackRouterVite({
routesDirectory: "./app/routes",
generatedRouteTree: "./app/routeTree.gen.ts",
autoCodeSplitting: true,
}),
reactRefresh(),
tsConfigPaths(),
],
},
],
});