fix: restore Swagger UI on api-docs page
- Change Vite proxy pattern from /api to /api/ so /api-docs client route is not captured and proxied to the backend - Fix SwaggerUIBundle init: remove empty presets/layout overrides that crashed the internal persistConfigs function - Use correct CSS import (swagger-ui.css instead of index.css) - Add requestInterceptor to auto-attach JWT token to Try-it-out calls - Add swagger-ui-bundle to optimizeDeps.include for reliable loading - Remove unused swagger-ui-dist.d.ts type declarations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
'/api/': {
|
||||
target: apiTarget,
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
@@ -21,6 +21,9 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['swagger-ui-dist/swagger-ui-bundle'],
|
||||
},
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user