Files
web-core/vite.config.ts
Beatrice Dellacà d7e144620e
All checks were successful
continuous-integration/drone/push Build is passing
add unit tests
2026-02-24 11:14:24 +01:00

33 lines
816 B
TypeScript

import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import { resolve } from 'node:path';
export default defineConfig({
plugins: [react()],
build: {
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'PanicCore',
formats: ['es'],
fileName: () => 'index.js',
},
rollupOptions: {
external: ['react'],
},
},
test: {
environment: 'jsdom',
setupFiles: ['./tests/setup.ts'],
coverage: {
provider: 'v8',
include: ['src/**/*.{ts,tsx}'],
exclude: ['src/index.ts'],
thresholds: {
lines: 95,
functions: 95,
branches: 90,
},
},
},
});