- Add React/Vite frontend for login, dashboard, reports, templates, users, settings, AI, speech, and media workflows. - Add NestJS/Prisma/PostgreSQL backend with auth, dashboard stats, reports, templates, users, departments, settings, files, AI, speech, audit logs, and HTML sanitization. - Add Prisma schema, migrations, seed data, persistent app sessions, Docker/Nginx deployment files, and upload volume configuration. - Add Vitest, Playwright, backend integration tests, and project documentation for requirements, design, permissions, API contracts, testing, deployment, security, and progress. - Configure production local fallback switch and remove unused Gemini direct dependency/env wiring.
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import tailwindcss from '@tailwindcss/vite';
|
||
import react from '@vitejs/plugin-react';
|
||
import path from 'path';
|
||
import {loadEnv} from 'vite';
|
||
import {defineConfig} from 'vitest/config';
|
||
|
||
export default defineConfig(({mode}) => {
|
||
const env = loadEnv(mode, '.', '');
|
||
const apiProxyTarget = env.VITE_API_PROXY_TARGET || 'http://localhost:3000';
|
||
return {
|
||
plugins: [react(), tailwindcss()],
|
||
resolve: {
|
||
alias: {
|
||
'@': path.resolve(__dirname, '.'),
|
||
},
|
||
},
|
||
server: {
|
||
// HMR is disabled in AI Studio via DISABLE_HMR env var.
|
||
// Do not modifyâfile watching is disabled to prevent flickering during agent edits.
|
||
hmr: process.env.DISABLE_HMR !== 'true',
|
||
proxy: {
|
||
'/api': {
|
||
target: apiProxyTarget,
|
||
changeOrigin: true,
|
||
ws: true,
|
||
},
|
||
},
|
||
},
|
||
test: {
|
||
environment: 'jsdom',
|
||
include: ['src/**/*.{test,spec}.{ts,tsx}', 'server/**/*.{test,spec}.ts'],
|
||
exclude: ['e2e/**', 'node_modules/**', 'dist/**'],
|
||
globals: true,
|
||
setupFiles: './src/test/setup.ts',
|
||
},
|
||
};
|
||
});
|