analytics-switch/vitest.config.ts
Tudor Stanciu 14f1b11263 Merged PR 106: chore: upgrade package version to 1.1.0 and refactor codebase to TypeScript
chore: upgrade package version to 1.1.0 and refactor codebase to TypeScript

- Updated package version in package.json from 1.0.1 to 1.1.0.
- Changed main entry point to use built files in dist directory.
- Removed Babel configuration and build scripts in favor of tsup.
- Deleted copy-files script as it is no longer needed.
- Refactored AnalyticsSwitch component from JavaScript to TypeScript.
- Added unit tests for AnalyticsSwitch component.
- Created new TypeScript files for UmamiAnalytics and MatomoAnalytics components.
- Implemented custom hooks for loading Umami and Matomo scripts.
- Added TypeScript types for analytics components and props.
- Set up TypeScript configuration and build process with tsup.
- Configured Vitest for testing with setup files and coverage reporting.
2025-08-10 18:02:52 +00:00

17 lines
398 B
TypeScript

/// <reference types="vitest" />
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: "jsdom",
setupFiles: ["./src/__tests__/setup.ts"],
coverage: {
reporter: ["text", "json", "html"],
exclude: ["node_modules/", "src/__tests__/"]
}
}
});