Files

18 lines
494 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// 同时用于浏览器与 TauriTauri 会在 dev/build 时注入 TAURI_ENV_* 环境变量)
export default defineConfig({
plugins: [vue()],
// Tauri 期望静态资源走相对路径,且必须设置固定端口供其内嵌 WebView 使用
clearScreen: false,
server: {
port: 1420,
strictPort: true,
watch: {
ignored: ['**/src-tauri/**']
}
},
envPrefix: ['VITE_', 'TAURI_ENV_']
})