Files
mixvideo-v2/apps/desktop/vite.config.ts
imeepos 1a5fcf6485 Initial commit: MixVideo Desktop v0.1.0
Features:
-  Cross-platform Tauri desktop application
-  React + TypeScript + Vite frontend
-  Rust backend with Tauri 2.0
-  Multi-package management (PNPM + Cargo workspaces)
-  GitHub Actions CI/CD pipeline
-  Modern project structure and configuration

 Build artifacts:
- Windows MSI and NSIS installers
- Cross-platform executable
- Automated release workflow

 Tech stack:
- Frontend: React 18 + TypeScript + Vite
- Backend: Rust + Tauri 2.0
- Package management: PNPM Workspace + Cargo Workspace
- CI/CD: GitHub Actions
2025-07-13 17:57:52 +08:00

33 lines
820 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// @ts-expect-error process is a nodejs global
const host = process.env.TAURI_DEV_HOST;
// https://vitejs.dev/config/
export default defineConfig(async () => ({
plugins: [react()],
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
//
// 1. prevent vite from obscuring rust errors
clearScreen: false,
// 2. tauri expects a fixed port, fail if that port is not available
server: {
port: 5173,
strictPort: true,
host: host || false,
hmr: host
? {
protocol: "ws",
host,
port: 1421,
}
: undefined,
watch: {
// 3. tell vite to ignore watching `src-tauri`
ignored: ["**/src-tauri/**"],
},
},
}));