Files
u-ppt/vite.config.ts
绝尘 b9a388b570 新增: Tauri 2.0 桌面版脚手架(B0)
- src-tauri/ 完整项目结构: Cargo.toml / build.rs / tauri.conf.json
- Rust 入口 lib.rs: ping IPC 命令验证双向通信
- 应用图标生成(SVG → ico/icns/png 多尺寸)
- Tauri 窗口配置: 1280×800, 最小 900×600, 可缩放
- package.json 新增 tauri / tauri:dev / tauri:build 脚本
- vite.config.ts 环境检测: Tauri 模式端口 5173, Web 模式 8080
- @tauri-apps/cli + @tauri-apps/api 依赖安装
- cargo check 编译通过,前端构建不受影响
- 桌面版与 Web 版共享同一套前端代码
2026-07-12 15:11:35 +08:00

11 lines
338 B
TypeScript
Raw 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'
export default defineConfig({
plugins: [vue()],
// Tauri 期望固定端口 5173Web 单独跑用 8080
server: process.env.TAURI_ENV_PLATFORM
? { host: '127.0.0.1', port: 5173, strictPort: true }
: { host: '127.0.0.1', port: 8080, open: true },
})