-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
41 lines (39 loc) · 1.21 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
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel/serverless';
// Using Vite on Windows Subsystem for Linux (WSL) 2
// https://vitejs.dev/config/server-options.html#server-watch
// Note that usePolling leads to high CPU utilization.
import react from '@astrojs/react';
import tailwind from '@astrojs/tailwind';
// https://astro.build/config
export default defineConfig({
vite: {
server: {
watch: {
usePolling: true,
interval: 1000, // default: 100
binaryInterval: 1500, // default: 300
},
},
},
// https://docs.astro.build/en/reference/configuration-reference/#devtoolbarenabled
devToolbar: {
enabled: false,
},
integrations: [
react(),
tailwind({
// https://docs.astro.build/ja/guides/integrations-guide/tailwind/#nesting
// Allow writing nested CSS declarations alongside Tailwind's syntax
nesting: true,
}),
],
output: 'server',
adapter: vercel({
// Image service doesn't work by default, so if we didn't enable it,
// the requests sent by `<Image />` will result in 404 errors.
// https://stackoverflow.com/a/77738867
imageService: true,
webAnalytics: { enabled: true },
}),
});