45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5174, // Different port from bronhouder.nl (5173)
|
|
proxy: {
|
|
// Geo API proxy (PostGIS backend)
|
|
'/api/geo': {
|
|
target: 'http://localhost:8002',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api\/geo/, ''),
|
|
},
|
|
// RAG API proxy (Heritage RAG backend)
|
|
'/api/rag': {
|
|
target: 'http://localhost:8003',
|
|
changeOrigin: true,
|
|
},
|
|
// Generic API fallback
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
},
|
|
// Oxigraph SPARQL endpoint proxy
|
|
'/sparql': {
|
|
target: 'http://127.0.0.1:7878',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/sparql/, ''),
|
|
},
|
|
},
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: './tests/setup.ts',
|
|
},
|
|
})
|