-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
38 lines (36 loc) · 956 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
import path, { dirname } from 'path'
import { fileURLToPath, URL } from 'url'
import { defineConfig, type UserConfigExport } from 'vite'
import vue from '@vitejs/plugin-vue'
import vuetify from 'vite-plugin-vuetify'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import { splitVendorChunkPlugin } from 'vite'
const _dirname = dirname(fileURLToPath(import.meta.url))
export default defineConfig({
plugins: [
splitVendorChunkPlugin(),
vue(),
vuetify({
autoImport: true,
// styles: 'expose',
}),
VueI18nPlugin({
runtimeOnly: false, // temp solution to fix interpolation in messages
globalSFCScope: true,
include: path.resolve(_dirname, './src/locales/**.json'),
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
watch: {
usePolling: true,
},
},
preview: {
port: 8172,
},
} as UserConfigExport)