-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
63 lines (62 loc) · 1.7 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { defineConfig } from "astro/config";
import cloudflare from "@astrojs/cloudflare";
import sitemap from "@astrojs/sitemap";
import react from "@astrojs/react";
import markdoc from "@astrojs/markdoc";
import autoprefixer from "autoprefixer";
import postcssUtopia from "postcss-utopia";
import postcssMediaMinMax from "postcss-media-minmax";
import postcssLogicalViewportUnits from "@csstools/postcss-logical-viewport-units";
import postcssClamp from "postcss-clamp";
import cssnano from "cssnano";
// https://astro.build/config
export default defineConfig({
output: "static",
adapter: cloudflare({
imageService: "compile",
}),
site: "https://namesake.fyi",
integrations: [
sitemap(),
react(),
markdoc(),
// keystatic() Re-enable when Keystatic supports Astro v5
],
prefetch: true,
vite: {
ssr: {
external: ["buffer", "path", "fs", "os", "crypto", "async_hooks"].map(
(i) => `node:${i}`,
),
},
resolve: {
// Workaround until fixed: https://github.com/withastro/adapters/pull/436
// Use react-dom/server.edge instead of react-dom/server.browser for React 19.
// Without this, MessageChannel from node:worker_threads needs to be polyfilled.
alias: import.meta.env.PROD && {
"react-dom/server": "react-dom/server.edge",
},
},
css: {
postcss: {
plugins: [
autoprefixer(),
postcssUtopia({
minWidth: 320,
maxWidth: 1240,
}),
postcssMediaMinMax(),
postcssLogicalViewportUnits(),
postcssClamp(),
cssnano(),
],
},
},
},
devToolbar: {
enabled: false,
},
server: {
host: true,
},
});