Files
web-ui/vite.config.ts
Beatrice Dellacà dd084369e9
All checks were successful
continuous-integration/drone/push Build is passing
update thresholds
2026-02-24 12:10:36 +01:00

52 lines
1.4 KiB
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: {
index: resolve(__dirname, 'src/index.ts'),
'components/MDXEditorField': resolve(
__dirname,
'src/components/MDXEditorField.tsx',
),
},
name: 'PanicWebUi',
formats: ['es'],
fileName: (_format, entryName) => `${entryName}.js`,
},
rollupOptions: {
external: [
'react',
'react-dom',
'react-router-dom',
'@heroicons/react',
'@mdxeditor/editor',
],
},
},
test: {
environment: 'jsdom',
setupFiles: ['./tests/setup.ts'],
coverage: {
provider: 'v8',
include: ['src/**/*.{ts,tsx}'],
exclude: [
'src/**/*.story.{ts,tsx}',
'src/**/*.stories.{ts,tsx}',
'src/index.ts',
'src/styles/**',
'src/components/types.ts',
'src/types/**',
],
thresholds: {
lines: 80,
functions: 75,
branches: 70,
},
},
},
});