forked from fuyoo/bs-redis-desktop-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
34 lines (33 loc) · 876 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
import {defineConfig} from 'vite'
import UnoCSS from 'unocss/vite'
import vue from '@vitejs/plugin-vue'
import pkg from './package.json'
import path from 'node:path'
import dayjs from 'dayjs'
export default defineConfig(async () => ({
plugins: [
vue(),
UnoCSS()
],
clearScreen: false,
server: {
port: 1420,
strictPort: true,
watch: {
// 3. tell vite to ignore watching `src-tauri`
ignored: ['**/src-tauri/**', '.idea']
}
},
define: {
"import.meta.env.VITE_VERSION": JSON.stringify({
version: pkg.version,
lastBuildTime: dayjs().format('YYYY-MM-DD HH:mm:ss')
})
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
},
extensions: [".js",".ts",".vue",".tsx",".jsx",".mjs",".json"]
}
}))