-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.ts
53 lines (47 loc) · 1.44 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
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
// https://astro.build/config
import vercel from "@astrojs/vercel/serverless";
// https://astro.build/config
import image from "@astrojs/image";
// https://astro.build/config
import mdx from "@astrojs/mdx";
import readingTime from "remark-reading-time";
import readingMdxTime from "remark-reading-time/mdx";
import headingSlugs from 'rehype-slug';
import autolinkHeadings from 'rehype-autolink-headings';
// https://astro.build/config
import prefetch from "@astrojs/prefetch";
// https://astro.build/config
import sitemap from "@astrojs/sitemap";
// https://astro.build/config
export default defineConfig({
output: 'server',
adapter: vercel(),
site: import.meta.env.DEV ? 'http://localhost:3000' : 'https://chrisdmacrae.com',
integrations: [react(), image({
serviceEntryPoint: '@astrojs/image/sharp'
}), mdx({
remarkPlugins: [readingTime, readingMdxTime],
extendMarkdownConfig: true
}), prefetch(), sitemap()],
markdown: {
syntaxHighlight: 'prism',
rehypePlugins: [headingSlugs, autolinkHeadings]
},
vite: {
ssr: {
noExternal: ['@react-aria/overlays']
},
build: {
// workaround bug "index" file
// @link https://github.com/withastro/astro/issues/3805
rollupOptions: {
output: {
entryFileNames: "entry.[hash].js",
chunkFileNames: "chunks/chunk.[hash].js"
}
}
}
}
});