Dispatcharr/frontend/vite.config.js
SergeantPanda cdfe16ae5d fix(schema): resolve Swagger/OpenAPI schema generation issues under concurrent requests
- Implemented a new `LockedSpectacularAPIView` to handle schema generation, ensuring it no longer fails due to concurrent gevent requests. The schema builds are now single-flight per process and cached in Django's cache, allowing all workers to share the result.
- Updated the `urls.py` to use the new view for schema generation, enhancing stability and performance.
2026-07-16 18:57:57 +00:00

35 lines
818 B
JavaScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
// https://vite.dev/config/
export default defineConfig({
// The base URL for the build, adjust this to match your desired path
plugins: [react()],
// publicDir: '/data',
server: {
port: 9191,
// Without this, /api/* is served as the React SPA in debug mode and
// Swagger UI at /api/swagger/ never loads the OpenAPI schema.
proxy: {
"/api": {
target: "http://127.0.0.1:5656",
changeOrigin: true,
secure: false,
},
"/ws": {
target: "http://127.0.0.1:8001",
changeOrigin: true,
secure: false,
ws: true,
},
},
},
test: {
environment: 'jsdom',
setupFiles: ['./src/test/setupTests.js'],
globals: true,
},
});