-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.ts
38 lines (34 loc) · 941 Bytes
/
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
import path from 'node:path';
import { defineConfig } from 'astro/config';
import svelte from '@astrojs/svelte';
import mdx from '@astrojs/mdx';
import icon from 'astro-icon';
import UnoCSS from 'unocss/astro';
import compressor from 'astro-compressor';
import playformCompress from '@playform/compress';
import purgecss from 'astro-purgecss';
import tsconfig from './tsconfig.json';
let aliasesArray: { [key: string]: string } = {};
for (const [alias, targetPath] of Object.entries(tsconfig.compilerOptions.paths)) {
aliasesArray = {
...aliasesArray,
...{
[alias]: path.resolve(targetPath[0]),
},
};
}
// https://astro.build/config
export default defineConfig({
vite: {
resolve: {
alias: aliasesArray,
},
},
markdown: {
gfm: false,
shikiConfig: {
theme: 'dracula',
},
},
integrations: [icon(), mdx(), svelte(), UnoCSS(), purgecss(), playformCompress(), compressor()],
});