-
Notifications
You must be signed in to change notification settings - Fork 158
/
vite.config.ts
68 lines (67 loc) · 1.63 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import { defineConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import UnoCSS from 'unocss/vite'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ArcoResolver } from 'unplugin-vue-components/resolvers'
import Markdown from 'unplugin-vue-markdown/vite'
import Shiki from 'markdown-it-shiki'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import VueRouter from 'unplugin-vue-router/vite'
import { VueRouterAutoImports } from 'unplugin-vue-router'
import VueDevTools from 'vite-plugin-vue-devtools'
export default defineConfig({
plugins: [
VueRouter({
dts: './src/typings/vue-router.d.ts',
extensions: ['.vue'],
routesFolder: [
{
src: './src/views',
},
],
}),
Vue({
include: [/\.vue$/, /\.md$/],
}),
Markdown({
markdownItSetup(md) {
md.use(Shiki)
},
}),
UnoCSS(),
AutoImport({
eslintrc: {
enabled: true,
filepath: './src/typings/.eslintrc.json',
},
dts: './src/typings/imports.d.ts',
imports: [
'@vueuse/core',
'pinia',
'vue-i18n',
'vue',
VueRouterAutoImports,
],
resolvers: [ArcoResolver()],
}),
Components({
dts: './src/typings/components.d.ts',
resolvers: [
ArcoResolver({
sideEffect: false,
}),
],
}),
VueI18nPlugin({
include: [resolve(__dirname, './src/locales/**')],
}),
VueDevTools(),
],
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
})