diagrams-opus-tauri/vite.config.ts
Ilya Ashikhmin d495401bc1 feat(ui): full React editor UI, IO, demo seed, and tests
- graphOps: paper-independent graph logic (add/connect/network/flow/serialize)
  so core is unit-testable in jsdom; CanvasController delegates to it
- App shell: toolbar, node palette (grouped/searchable/draggable), tabbed
  properties + configuration panels, status bar with calc summary
- PropertyField editors for all 8 property types with validation
- Keyboard shortcuts (undo/redo/copy/cut/paste/dup/select-all/delete/zoom)
- Document IO (Tauri dialog+fs with browser download/upload fallback), SVG/PNG
- Demo network seeded on first launch
- Tests: 5 graphOps integration + 9 UI component (47 total)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 23:32:27 +02:00

31 lines
922 B
TypeScript

import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
// Tauri expects a fixed port; fail if unavailable.
// `react()` is typed against the top-level Vite while `vitest/config` bundles
// its own Vite copy; cast past that harmless version skew.
export default defineConfig({
// eslint-disable-next-line @typescript-eslint/no-explicit-any
plugins: [react() as any],
clearScreen: false,
server: {
port: 1420,
strictPort: true,
watch: {
// Don't watch the Rust backend from the frontend dev server.
ignored: ["**/src-tauri/**"],
},
},
test: {
globals: true,
environment: "jsdom",
setupFiles: ["./src/test/setup.ts"],
include: ["src/**/*.{test,spec}.{ts,tsx}"],
coverage: {
provider: "v8",
include: ["src/**/*.{ts,tsx}"],
exclude: ["src/**/*.{test,spec}.{ts,tsx}", "src/test/**", "src/main.tsx"],
},
},
});