generated from surjithctly/astroship
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
55 lines (53 loc) · 1.6 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
import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import react from '@astrojs/react';
// import cloudflare from '@astrojs/cloudflare';
import icon from 'astro-icon';
import partytown from '@astrojs/partytown';
import sentry from '@sentry/astro';
import node from '@astrojs/node';
import { loadEnv } from 'vite';
import vercel from '@astrojs/vercel/serverless';
import critters from 'astro-critters';
import compressor from 'astro-compressor';
const env = loadEnv(process.env.NODE_ENV, process.cwd(), '');
// https://astro.build/config
export default defineConfig({
site: 'https://hsc-site.vercel.app',
image: {
domains: ['images.ctfassets.net'],
},
prefetch: {
prefetchAll: true,
defaultStrategy: 'viewport',
},
integrations: [react(), tailwind({
nesting: true,
}), mdx(), sitemap(), icon({
include: {
mdi: ['calendar', 'location', 'facebook', 'instagram', 'youtube', 'arrow-right'],
uil: ['envelope', 'instagram'],
},
}), partytown({
config: {
forward: ['dataLayer.push'],
},
}),
/* sentry({ sentry on vercel is kinda broken rn
dsn: 'https://7fe022e75fa6bbf1ba04f227f37431c9@o975437.ingest.sentry.io/4506211627565056',
sourceMapsUploadOptions: {
project: 'hci-hsc',
authToken: env.SENTRY_AUTH_TOKEN,
},
}), */
critters(), compressor({
fileExtensions: ['.css', '.js', '.html', '.xml', '.cjs', '.mjs', '.svg', '.txt', '.ttf', '.otf', '.jpg'],
})],
output: 'server',
// adapter: node({ mode: 'standalone' }),
adapter: vercel({
imageService: true,
}), // kys cloudflare
});