import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// Tauri 推荐的 Vite 配置：固定端口、关闭 HMR overlay 等
// 详见 https://v2.tauri.app/start/frontend/vite/
export default defineConfig({
    plugins: [react()],
    clearScreen: false,
    server: {
        port: 1420,
        strictPort: true,
        host: false,
        hmr: {
            protocol: "ws",
            host: "localhost",
            port: 1421,
        },
        watch: {
            ignored: ["**/src-tauri/**"],
        },
    },
    build: {
        target: "esnext",
        minify: "esbuild",
        sourcemap: false,
    },
});
