-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathvite.config.js
More file actions
37 lines (36 loc) · 855 Bytes
/
vite.config.js
File metadata and controls
37 lines (36 loc) · 855 Bytes
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
import process from 'node:process'
import vue from '@vitejs/plugin-vue'
import UnoCSS from 'unocss/vite'
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [
vue(),
UnoCSS(),
],
clearScreen: false,
// Tauri应用需要使用相对路径
base: './',
server: {
port: 5176,
strictPort: true,
host: '0.0.0.0',
hmr: {
port: 5177,
},
},
envPrefix: ['VITE_', 'TAURI_'],
build: {
target: process.env.TAURI_PLATFORM === 'windows' ? 'chrome105' : 'safari13',
minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
sourcemap: !!process.env.TAURI_DEBUG,
chunkSizeWarningLimit: 1500,
rollupOptions: {
output: {
manualChunks: {
vendor: ['vue', '@vueuse/core'],
markdown: ['markdown-it', 'highlight.js'],
},
},
},
},
})