import { defineConfig } from "vitest/config"; import react from "@vitejs/plugin-react"; // @ts-expect-error process is a nodejs global const host = process.env.TAURI_DEV_HOST; // Ports are offset from margin's 1420/1421 so both apps can run side by side. export default defineConfig({ plugins: [react()], clearScreen: false, server: { port: 1430, strictPort: true, host: host || false, hmr: host ? { protocol: "ws", host, port: 1431, } : undefined, watch: { ignored: ["**/src-tauri/**"], }, }, test: { include: ["src/**/*.test.ts"], environment: "node", }, });