UPDATE/FIX: Configure frontend-dev proxy
This commit is contained in:
@@ -1,34 +1,48 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from "vite";
|
||||||
import react from '@vitejs/plugin-react'
|
import react from "@vitejs/plugin-react";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react({
|
plugins: [
|
||||||
// Add development-specific React plugin options
|
react({
|
||||||
jsxRuntime: 'automatic'
|
// Add development-specific React plugin options
|
||||||
})],
|
jsxRuntime: "automatic",
|
||||||
server: {
|
}),
|
||||||
port: 5173,
|
],
|
||||||
proxy: {
|
server: {
|
||||||
'/api': {
|
port: 5173,
|
||||||
target: 'http://localhost:8080',
|
proxy: {
|
||||||
changeOrigin: true,
|
"/api": {
|
||||||
secure: false
|
target: "http://localhost:8080",
|
||||||
|
changeOrigin: true,
|
||||||
|
secure: false,
|
||||||
|
},
|
||||||
|
"/socket.io": {
|
||||||
|
target: "http://localhost:8080",
|
||||||
|
changeOrigin: true,
|
||||||
|
ws: true,
|
||||||
},
|
},
|
||||||
'/socket.io': {
|
"/stream": {
|
||||||
target: 'http://localhost:8080',
|
target: "http://localhost:8080",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
ws: true
|
},
|
||||||
}
|
"/images": {
|
||||||
}
|
target: "http://localhost:8080",
|
||||||
},
|
changeOrigin: true,
|
||||||
build: {
|
},
|
||||||
sourcemap: true,
|
"/user": {
|
||||||
outDir: 'dist'
|
target: "http://localhost:8080",
|
||||||
},
|
changeOrigin: true,
|
||||||
optimizeDeps: {
|
},
|
||||||
exclude: ['@vite/client', '@vite/env']
|
},
|
||||||
},
|
},
|
||||||
esbuild: {
|
build: {
|
||||||
logOverride: { 'this-is-undefined-in-esm': 'silent' }
|
sourcemap: true,
|
||||||
}
|
outDir: "dist",
|
||||||
})
|
},
|
||||||
|
optimizeDeps: {
|
||||||
|
exclude: ["@vite/client", "@vite/env"],
|
||||||
|
},
|
||||||
|
esbuild: {
|
||||||
|
logOverride: { "this-is-undefined-in-esm": "silent" },
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user