-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.ts
78 lines (77 loc) · 2.08 KB
/
astro.config.ts
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import { defineConfig } from "astro/config"
import react from "@astrojs/react"
import { TanStackRouterVite } from "@tanstack/router-plugin/vite"
import tailwind from "@astrojs/tailwind"
import { nodePolyfills } from "vite-plugin-node-polyfills"
import netlify from "@astrojs/netlify"
// https://astro.build/config
export default defineConfig({
integrations: [
react(),
tailwind({
applyBaseStyles: false,
}),
],
srcDir: "app",
output: "server",
adapter: netlify(),
vite: {
plugins: [
TanStackRouterVite({
routesDirectory: "./app/routes",
generatedRouteTree: "./app/routeTree.gen.ts",
quoteStyle: "double",
semicolons: false,
}),
nodePolyfills(),
],
resolve: {
alias: {
crypto: "node:crypto",
dns: "node:dns",
fs: "node:fs",
net: "node:net",
tls: "node:tls",
http: "node:http",
https: "node:https",
events: "node:events",
os: "node:os",
path: "node:path",
stream: "node:stream",
string_decoder: "node:string_decoder",
url: "node:url",
util: "node:util",
},
},
build: {
minify: false,
rollupOptions: {
external: [
"cloudflare:sockets",
"node:crypto",
"node:dns",
"node:fs",
"node:net",
"node:tls",
"node:http",
"node:https",
"node:events",
"node:os",
"node:path",
"node:stream",
"node:string_decoder",
"node:url",
"node:util",
],
},
},
define: {
"process.env.DB_URL": JSON.stringify(process.env.DB_URL),
"process.env.DB_AUTHTOKEN": JSON.stringify(process.env.DB_AUTHTOKEN),
"process.env.OPENAI_KEY": JSON.stringify(process.env.OPENAI_KEY),
"process.env.OPENAI_PROJECT_ID": JSON.stringify(process.env.OPENAI_PROJECT_ID),
"process.env.OPENAI_ORG_ID": JSON.stringify(process.env.OPENAI_ORG_ID),
"process.env.GCT_CREDENTIAL": JSON.stringify(process.env.GCT_CREDENTIAL),
},
},
})