- Add permissions logic for status options in corrective actions. - Create tests for permissions functionality. - Implement queries for user authentication and actions management. - Develop Actions page to display and manage corrective actions. - Create authentication pages for login, setup, and password reset. - Add IncidentDetail page to view incident details and associated actions. - Implement Settings page for user management and password changes.
28 lines
947 B
TypeScript
28 lines
947 B
TypeScript
/// <reference types="vitest/config" />
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { readFileSync } from 'node:fs'
|
|
import { defineConfig } from 'vite'
|
|
|
|
const { version } = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8')) as { version: string }
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
define: { __APP_VERSION__: JSON.stringify(version) },
|
|
server: {
|
|
proxy: { '/api': 'http://localhost:3000' },
|
|
},
|
|
test: {
|
|
projects: [
|
|
{
|
|
extends: true,
|
|
test: { name: 'web', environment: 'jsdom', globals: true, setupFiles: ['./src/test/setup.ts'], include: ['src/**/*.test.{ts,tsx}'] },
|
|
},
|
|
{
|
|
test: { name: 'server', environment: 'node', globals: true, testTimeout: 30_000, hookTimeout: 30_000, include: ['server/**/*.test.ts', 'shared/**/*.test.ts'] },
|
|
},
|
|
],
|
|
},
|
|
})
|