-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathastro.config.ts
57 lines (54 loc) · 1.36 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
54
55
56
57
import mdx from '@astrojs/mdx';
import react from '@astrojs/react';
import solid from '@astrojs/solid-js';
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
import { CONFIG } from './src/config';
import { expressiveCodeIntegration } from './src/libs/integrations/expressive-code';
import { sitemapIntegration } from './src/libs/integrations/sitemap';
const { SITE_URL } = CONFIG;
const remarkPlugins = [remarkReadingTime];
export default defineConfig({
site: SITE_URL,
trailingSlash: 'ignore',
// default
compressHTML: true,
server: {
port: 3000,
},
devToolbar: {
enabled: false,
},
integrations: [
expressiveCodeIntegration(),
sitemapIntegration(),
solid({
include: ['src/**'],
exclude: ['**/*react*/**'],
}),
react({
include: ['**/*react*/**'],
}),
// applyBaseStyles: false prevents double loading of tailwind
tailwind({
applyBaseStyles: false,
}),
mdx(),
icon({
iconDir: 'src/assets/icons',
}),
],
markdown: {
remarkPlugins,
},
vite: {
// optimizeDeps: { exclude: ['sharp'] },
build: {
sourcemap: false,
},
},
});