forked from withastro/astro.build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
44 lines (41 loc) · 1.05 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
44
import { defineConfig } from "astro/config"
import fs from "node:fs"
import image from "@astrojs/image"
import mdx from "@astrojs/mdx"
import netlify from "@astrojs/netlify/functions"
import prefetch from "@astrojs/prefetch"
import sitemap from "@astrojs/sitemap"
import solidJs from "@astrojs/solid-js"
import tailwind from "@astrojs/tailwind"
/* https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables */
const NETLIFY_PREVIEW_SITE = process.env.CONTEXT !== "production" && process.env.DEPLOY_PRIME_URL
// https://astro.build/config
export default defineConfig({
site: NETLIFY_PREVIEW_SITE || "https://astro.build",
integrations: [
image({
serviceEntryPoint: "@astrojs/image/sharp",
}),
tailwind({
config: {
applyBaseStyles: false,
},
}),
solidJs(),
mdx(),
sitemap(),
prefetch(),
],
markdown: {
shikiConfig: {
theme: JSON.parse(fs.readFileSync("./houston.theme.json", { encoding: "utf-8" })),
},
},
vite: {
ssr: {
noExternal: ["smartypants"],
},
},
output: "server",
adapter: netlify(),
})