migration to vite and cleaned up /uploads

This commit is contained in:
jackiettran
2026-01-18 16:55:19 -05:00
parent f9c2057e64
commit d570f607d3
34 changed files with 2357 additions and 16613 deletions

44
frontend/vite.config.ts Normal file
View File

@@ -0,0 +1,44 @@
/// <reference types="vitest" />
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return {
plugins: [react(), tsconfigPaths()],
server: {
port: 3000,
open: false,
proxy: {
'/api': { target: env.VITE_BASE_URL || 'http://localhost:5001', changeOrigin: true },
'/socket.io': { target: env.VITE_BASE_URL || 'http://localhost:5001', changeOrigin: true, ws: true },
},
},
build: { outDir: 'build', sourcemap: true },
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/setupTests.ts'],
include: ['src/**/*.{test,spec}.{js,jsx,ts,tsx}', 'src/**/__tests__/**/*.{js,jsx,ts,tsx}'],
coverage: {
provider: 'v8',
reporter: ['text', 'lcov', 'html'],
include: ['src/**/*.{js,jsx,ts,tsx}'],
exclude: [
'src/index.tsx',
'src/**/*.d.ts',
'src/setupTests.ts',
'src/setupEnv.ts',
'src/test-polyfills.js',
'src/mocks/**',
'src/__mocks__/**',
],
thresholds: {
lines: 80,
statements: 80,
},
},
},
};
});