import path from "node:path"; import react from "@vitejs/plugin-react"; import { defineConfig } from "vitest/config"; // Kept separate from vite.config.ts on purpose: the app-shell routes plugin // pulled in by vite.config.ts scans every page component at startup, which // is unnecessary for unit tests and slows the runner significantly. // // The eslint-disable is a known cosmetic workaround for vitest@4's // transitive vite@7 types colliding with this repo's vite@8 at the // PluginOption boundary. Runtime behaviour is correct. export default defineConfig({ // eslint-disable-next-line @typescript-eslint/no-explicit-any plugins: [react() as any], resolve: { alias: { "@": path.resolve(import.meta.dirname, "./src"), }, }, test: { environment: "jsdom", globals: true, setupFiles: ["./src/test/setup.tsx"], include: ["src/**/*.test.{ts,tsx}"], css: false, }, });