/// import react from "@vitejs/plugin-react" import path from "path" import { defineConfig } from "vitest/config" import { fileURLToPath } from "url" const __dirname = path.dirname(fileURLToPath(import.meta.url)) export default defineConfig({ plugins: [react()], test: { globals: true, environment: "jsdom", setupFiles: ["./tests/setup.tsx"], include: ["**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], exclude: [ "**/node_modules/**", "**/dist/**", "**/.next/**", "**/coverage/**", "**/.git/**", ], css: true, reporters: ["verbose"], coverage: { provider: "v8", reporter: ["text", "json", "html"], exclude: [ "coverage/**", "dist/**", "**/node_modules/**", ".next/**", "**/*.d.ts", "**/*.config.{js,ts,mjs}", "**/tests/**", "**/__tests__/**", "**/*.test.{js,ts,jsx,tsx}", "**/*.spec.{js,ts,jsx,tsx}", ], }, server: { deps: { inline: ["vitest-canvas-mock"], }, }, env: { NODE_ENV: "test", }, }, resolve: { alias: { "@": path.resolve(__dirname, "./"), }, }, css: { modules: { classNameStrategy: "non-scoped", }, }, })