forked from withastro/astro.build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
43 lines (40 loc) · 1.03 KB
/
astro.config.mjs
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 { defineConfig } from "astro/config"
import fs from "node:fs"
import mdx from "@astrojs/mdx"
import prefetch from "@astrojs/prefetch"
import sitemap from "@astrojs/sitemap"
import solidJs from "@astrojs/solid-js"
import tailwind from "@astrojs/tailwind"
import vercel from "@astrojs/vercel/serverless"
/* https://vercel.com/docs/projects/environment-variables/system-environment-variables#system-environment-variables */
const VERCEL_PREVIEW_SITE =
process.env.VERCEL_ENV !== "production" &&
process.env.VERCEL_URL &&
`https://${process.env.VERCEL_URL}`
// https://astro.build/config
export default defineConfig({
site: VERCEL_PREVIEW_SITE || "https://astro.build",
integrations: [
tailwind({
applyBaseStyles: false,
}),
solidJs(),
mdx(),
sitemap(),
prefetch(),
],
markdown: {
shikiConfig: {
theme: JSON.parse(fs.readFileSync("./houston.theme.json", { encoding: "utf-8" })),
},
},
vite: {
ssr: {
noExternal: ["smartypants"],
},
},
output: "hybrid",
adapter: vercel({
functionPerRoute: false,
}),
})