mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 19:21:54 +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
|
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({
|
export default defineConfig({
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/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
|
// Return empty array for extensions API as these modules
|
||||||
// are not on vite's dev server.
|
// are not on vite's dev server.
|
||||||
bypass: (req, res, options) => {
|
bypass: (req, res, options) => {
|
||||||
@@ -93,7 +95,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
'/ws': {
|
'/ws': {
|
||||||
target: 'ws://127.0.0.1:8188',
|
target: DEV_SERVER_COMFYUI_URL,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user