-
Notifications
You must be signed in to change notification settings - Fork 18
/
astro.config.ts
50 lines (47 loc) · 1.41 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
import mdx from '@astrojs/mdx';
import partytown from '@astrojs/partytown';
import react from '@astrojs/react';
import tailwind from '@astrojs/tailwind';
import icon from 'astro-icon';
import { defineConfig } from 'astro/config';
// must use relative imports, and their entire import subtrees
import { remarkReadingTime } from './plugins/remark-reading-time.mjs';
//
// all relative imports in subtree
// any of these files must not import CONFIG with env vars
import { envSchema, PROCESS_ENV } from './src/config/process-env';
import { expressiveCodeIntegration } from './src/libs/integrations/expressive-code';
import { sitemapIntegration } from './src/libs/integrations/sitemap';
const { SITE_URL } = PROCESS_ENV;
const remarkPlugins = [remarkReadingTime];
export default defineConfig({
site: SITE_URL,
env: envSchema,
experimental: {
responsiveImages: true,
svg: true,
},
trailingSlash: 'ignore',
// default
compressHTML: true,
server: { port: 3000 },
devToolbar: { enabled: false },
integrations: [
expressiveCodeIntegration(),
sitemapIntegration(),
react(),
mdx(),
// applyBaseStyles: false prevents double loading of tailwind
tailwind({ applyBaseStyles: false }),
icon({ iconDir: 'src/assets/icons' }),
partytown({
config: { forward: ['dataLayer.push'] },
}),
],
markdown: { remarkPlugins },
vite: {
build: {
sourcemap: false,
},
},
});