diff --git a/vite.config.mts b/vite.config.mts index c7b5442cc..9995d7314 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -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, }, }