mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 10:59:53 +00:00
Fix ws dev server URL (#213)
This commit is contained in:
@@ -78,11 +78,13 @@ function getModuleName(id: string): string {
|
||||
return fileName.replace(/\.\w+$/, ''); // Remove file extension
|
||||
}
|
||||
|
||||
const DEV_SERVER_COMFYUI_URL = process.env.DEV_SERVER_COMFYUI_URL || 'http://127.0.0.1:8188';
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: process.env.DEV_SERVER_COMFYUI_URL || 'http://127.0.0.1:8188',
|
||||
target: DEV_SERVER_COMFYUI_URL,
|
||||
// Return empty array for extensions API as these modules
|
||||
// are not on vite's dev server.
|
||||
bypass: (req, res, options) => {
|
||||
@@ -93,7 +95,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
'/ws': {
|
||||
target: 'ws://127.0.0.1:8188',
|
||||
target: DEV_SERVER_COMFYUI_URL,
|
||||
ws: true,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user