-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathastro.config.mjs
More file actions
85 lines (82 loc) · 2.36 KB
/
astro.config.mjs
File metadata and controls
85 lines (82 loc) · 2.36 KB
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
79
80
81
82
83
84
85
import mdx from "@astrojs/mdx";
import node from "@astrojs/node";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
import logger from "@inox-tools/runtime-logger";
import tailwindcss from "@tailwindcss/vite";
import https from "@vitejs/plugin-basic-ssl";
import favicon from "astro-favicons";
import { defineConfig, fontProviders } from "astro/config";
import { getHttpsConfig } from "./ssl.config.ts";
const site = process.env.SITE_URL ? `https://${process.env.SITE_URL}` : "https://localhost:4321";
const httpsConfig = getHttpsConfig();
/** @type {import('astro').AstroConfig} */
export default defineConfig({
site,
adapter: node({ mode: "standalone" }),
integrations: [
react({
babel: {
plugins: [["babel-plugin-react-compiler"]],
},
}),
favicon(),
logger(),
sitemap(),
mdx(),
],
experimental: {
fonts: [
{
name: "JetBrains Mono",
cssVariable: "--font-jetbrains-mono",
provider: fontProviders.fontsource(),
subsets: ["latin"],
fallbacks: ["monospace"],
},
],
},
env: {
schema: {
ASTRO_KEY: {
context: "server",
access: "secret",
type: "string",
},
DB_URL: {
context: "server",
access: "secret",
type: "string",
},
DB_AUTH_TOKEN: {
context: "server",
access: "secret",
type: "string",
},
DB_REPLICA_PATH: {
context: "server",
access: "secret",
type: "string",
optional: true,
},
DB_REPLICA_SYNC_INTERVAL: {
context: "server",
access: "secret",
type: "number",
optional: true,
},
SITE_URL: {
context: "server",
access: "public",
type: "string",
default: site,
},
},
},
vite: {
plugins: [...(import.meta.env.DEV && !httpsConfig ? [https()] : []), tailwindcss()],
server: {
https: httpsConfig,
},
},
});