forked from zh-network/zhnet-official-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
42 lines (40 loc) · 1 KB
/
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
40
41
42
/// <reference types="node" />
import type { UserConfig } from 'vite';
import { resolve } from 'path';
import Markdown from 'vite-plugin-vue-markdown';
import Pages from 'vite-plugin-pages';
import Components from 'unplugin-vue-components/vite';
import Vue from '@vitejs/plugin-vue';
import WindiCSS from 'vite-plugin-windicss';
import Icons from 'unplugin-icons/vite';
import { ViteSSGOptions } from 'vite-ssg';
const config: UserConfig & { ssgOptions?: ViteSSGOptions } = {
plugins: [
Vue({
include: [/\.vue$/, /\.md$/],
}),
Pages({
extensions: ['vue', 'md'],
}),
Markdown({
headEnabled: true,
}),
Components({
extensions: ['vue', 'md'],
// allow auto import and register components used in markdown
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
}),
WindiCSS(),
Icons(),
],
ssgOptions: {
script: 'async',
formatting: 'prettify',
},
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
};
export default config;