-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.ts
39 lines (36 loc) · 893 Bytes
/
vite.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
import path from 'path'
import { UserConfig } from 'vite'
import Voie from 'vite-plugin-voie'
import PurgeIcons from 'vite-plugin-purge-icons'
import ViteComponents from 'vite-plugin-components'
import Markdown from 'vite-plugin-md'
import Shiki from 'markdown-it-shiki'
const alias = {
'/~/': path.resolve(__dirname, 'src'),
}
const config: UserConfig = {
alias,
plugins: [
Voie({
// importMode: 'sync',
extensions: ['vue', 'md'],
}),
Markdown({
wrapperComponent: 'day-wrapper',
markdownItSetup(md) {
md.use(Shiki, { theme: { dark: 'nord', light: 'min-light' } })
},
}),
ViteComponents({
alias,
dirs: [
'src/components',
'src/sketches',
],
extensions: ['vue', 'md'],
customLoaderMatcher: ({ path }) => path.endsWith('.md'),
}),
PurgeIcons(),
],
}
export default config