2bb1309133
- Remove versioning from docker-compose.yml - Enhance Vite configuration to support API proxying for development - Improve error handling and data normalization in API service - Add fallback values in PublicationsTable and ResearcherCard components - Update sync functionality in DashboardPage to handle backend responses more effectively - Refactor mockSyncResearcher to simulate backend response structure
28 lines
655 B
JavaScript
28 lines
655 B
JavaScript
import { defineConfig, loadEnv } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), '')
|
|
const proxyTarget = env.VITE_API_PROXY_TARGET || 'http://localhost:8000'
|
|
|
|
return {
|
|
plugins: [react(), tailwindcss()],
|
|
server: {
|
|
host: true,
|
|
port: 5173,
|
|
proxy: {
|
|
'/researchers': {
|
|
target: proxyTarget,
|
|
changeOrigin: true,
|
|
},
|
|
'/health': {
|
|
target: proxyTarget,
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
})
|