-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
114 lines (102 loc) · 2.88 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite'
import DeployInfo from 'unplugin-deploy-info/vite'
import UnoCss from 'unocss/vite'
import VueRouter from 'unplugin-vue-router/vite'
import Inspector from 'vite-inspector'
import Alias from 'vite-plugin-alias'
import PKG from 'vite-plugin-package-configs'
import AutoEnv from 'vite-plugin-auto-env'
import Chai from 'vite-plugin-chai'
import Classify from 'vite-plugin-classify'
import TerminalLog from 'vite-plugin-terminal-log'
import { VueRouterAutoImports } from 'unplugin-vue-router'
import { unheadVueComposablesImports } from '@unhead/vue'
import DevTools from 'vite-plugin-vue-devtools'
export default defineConfig({
plugins: [
// https://github.com/vuejs/devtools-next
DevTools(),
// https://github.com/vite-inspector/vite-inspector
Inspector({
framework: 'vue',
}),
// https://github.com/posva/unplugin-vue-router
VueRouter(),
// https://github.com/elonehoo/vite-plugin-terminal-log
TerminalLog(),
// https://github.com/vitejs/vite-plugin-vue
Vue(),
// https://github.com/elonehoo/unplugin-auto-import-api
AutoImport({
imports: [
'vue',
'@vueuse/core',
'vitest',
unheadVueComposablesImports,
VueRouterAutoImports,
],
dts: true,
dirs: [
'./src/composables',
],
vueTemplate: true,
}),
// https://github.com/antfu/vite-plugin-components
Components({
dts: true,
}),
// https://github.com/antfu/unocss
// see unocss.config.ts for config
UnoCss(),
// https://github.com/elonehoo/vite-plugin-alias
Alias({
useConfig: true,
useTypescript: true,
}),
// https://github.com/elonehoo/vite-plugin-package-configs
PKG(),
// https://github.com/wip-elonehoo/vite-plugin-chai
Chai(),
// https://github.com/wip-elonehoo/vite-plugin-auto-env
AutoEnv(),
// https://github.com/wip-elonehoo/vite-plugin-classify
Classify(),
// https://github.com/elonehoo/unplugin-deploy-info
DeployInfo({
info: [
{
name: 'Vue Docs',
message: 'https://vuejs.org',
},
{
name: 'Vite Docs',
message: 'https://vitejs.dev',
},
{
name: 'pinia Docs',
message: 'https://pinia.vuejs.org',
},
{
name: 'Router Docs',
message: 'https://router.vuejs.org',
},
{
name: 'VueUse Docs',
message: 'https://vueuse.org',
},
{
name: 'Unocss Docs',
message: 'https://unocss.dev/interactive',
},
{
name: 'Vitest Docs',
message: 'https://vitest.dev',
},
],
}),
],
})