mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-21 17:19:20 +00:00
- 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.
35 lines
818 B
JavaScript
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,
|
|
},
|
|
});
|