| 1 | import react from "@vitejs/plugin-react"; |
| 2 | import { defineConfig } from "vitest/config"; |
| 3 | |
| 4 | export default defineConfig({ |
| 5 | plugins: [react()], |
| 6 | resolve: { |
| 7 | alias: { |
| 8 | "@clo/react-mutation": import.meta.resolve("./src/mod.ts"), |
| 9 | }, |
| 10 | }, |
| 11 | test: { |
| 12 | globals: true, |
| 13 | // Use happy-dom for React tests, fallback to node for others |
| 14 | environment: "happy-dom", |
| 15 | include: ["test/**/*.test.ts", "test/**/*.test.tsx"], |
| 16 | coverage: { |
| 17 | enabled: true, |
| 18 | provider: "v8", |
| 19 | reporter: ["text", "json", "html-spa", "json-summary"], |
| 20 | }, |
| 21 | }, |
| 22 | }); |