fix: merge vite dev proxy into existing server block

Authored By: TDvorak <[email protected]>

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomas DvorakandDevin committed 2026-09-21 17:28:04 +02:00
1 parent 060038cb6f
commit c3959d13e2
1 file changed
+8 -10
+8 -10
View File
@@ -6,16 +6,6 @@ import path from 'path'
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react()], plugins: [react()],
server: {
proxy: {
// Same-origin API path for dev - matches the nginx proxy in the shipped image
'/api': {
target: 'http://localhost:8082',
changeOrigin: true,
ws: true,
},
},
},
test: { test: {
globals: true, globals: true,
environment: 'happy-dom', environment: 'happy-dom',
@@ -64,6 +54,14 @@ export default defineConfig({
fs: { fs: {
// Allow serving files from project root // Allow serving files from project root
allow: ['..'] allow: ['..']
},
proxy: {
// Same-origin API path for dev - matches the nginx proxy in the shipped image
'/api': {
target: 'http://localhost:8082',
changeOrigin: true,
ws: true,
},
} }
}, },
// Preview server optimization // Preview server optimization