-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathvite.config.ts
54 lines (50 loc) · 1.2 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
import { defineConfig } from 'vite';
import Unocss from 'unocss/vite'
import { resolve } from 'pathe';
import vue from '@vitejs/plugin-vue';
import VueI18n from '@intlify/vite-plugin-vue-i18n';
import Components from 'unplugin-vue-components/vite'
import ViteFonts from 'vite-plugin-fonts';
import svgLoader from 'vite-svg-loader';
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 4000,
},
resolve: {
alias: {
'/@': resolve(__dirname, './src'),
},
},
plugins: [
vue(),
// https://github.com/jpkleemans/vite-svg-loader
svgLoader(),
// https://github.com/antfu/vite-plugin-components
Components({
extensions: ['vue'],
dts: 'src/components.d.ts',
}),
// https://github.com/stafyniaksacha/vite-plugin-fonts#readme
ViteFonts({
google: {
families: ['Open Sans', 'Montserrat', 'Fira Sans'],
},
}),
Unocss({ /* options */ }),
// https://github.com/intlify/vite-plugin-vue-i18n
VueI18n({
include: [resolve(__dirname, './locales/**')],
}),
],
optimizeDeps: {
include: [
'vue',
'vue-router',
'@vueuse/core',
],
exclude: [
'vue-demi',
],
},
});