forked from hackclub/sprig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
39 lines (37 loc) · 1.01 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
import { defineConfig } from 'astro/config'
import preact from '@astrojs/preact'
import vercel from '@astrojs/vercel/serverless'
import prefresh from '@prefresh/vite'
import svelte from '@astrojs/svelte'
import rehypeExternalLinks from 'rehype-external-links'
import fs from "node:fs";
import generateMetadata from "./src/integrations/generate-metadata"
const gameFiles = fs.readdirSync("games").filter(f => f.endsWith(".js")).map(game => `./games/${game}`);
export default defineConfig({
site: 'https://sprig.hackclub.com',
integrations: [
preact({ compat: true }),
svelte(),
generateMetadata()
],
output: 'server',
adapter: vercel({
includeFiles: gameFiles,
}),
vite: {
optimizeDeps: {
exclude: ['https']
},
plugins: [ prefresh() ],
ssr: {
// If an import is broken in the Vercel deployment, adding it here might fix it!
noExternal: [ 'react-icons', 'tinykeys' ]
}
},
markdown: {
shikiConfig: { theme: 'github-light' },
rehypePlugins: [
[ rehypeExternalLinks, { target: '_blank' } ]
]
}
})