34 lines
952 B
TypeScript
34 lines
952 B
TypeScript
import path from 'path';
|
|
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig(() => {
|
|
return {
|
|
server: {
|
|
port: 3001,
|
|
host: '0.0.0.0',
|
|
},
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, '.'),
|
|
},
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: './tests/setup.ts',
|
|
// The backend suite has its own config: node environment, its own .env
|
|
// (Postgres on 15432) and serial execution. Swept in here it ran under
|
|
// jsdom against the default port and failed wholesale. Run it with
|
|
// `npm test` inside backend/.
|
|
exclude: ['node_modules/**', 'dist/**', 'backend/**'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'html', 'json'],
|
|
exclude: ['node_modules/', '**/*.test.{ts,tsx}', '**/__tests__/**', 'tests/'],
|
|
},
|
|
},
|
|
};
|
|
});
|