mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-09 09:30:06 +00:00
Make dev server target configurable (#79)
This commit is contained in:
7
.env_example
Normal file
7
.env_example
Normal file
@@ -0,0 +1,7 @@
|
||||
# Local development playwright target
|
||||
PLAYWRIGHT_TEST_URL=http://localhost:5173
|
||||
# PLAYWRIGHT_TEST_URL=http://localhost:8188
|
||||
|
||||
# Proxy target of the local development server
|
||||
# Note: localhost:8188 does not work.
|
||||
DEV_SERVER_COMFYUI_URL=http://127.0.0.1:8188
|
||||
@@ -1,6 +1,8 @@
|
||||
import { defineConfig, Plugin } from 'vite';
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy'
|
||||
import path from 'path';
|
||||
import dotenv from "dotenv";
|
||||
dotenv.config();
|
||||
|
||||
const IS_DEV = process.env.NODE_ENV === 'development';
|
||||
|
||||
@@ -80,7 +82,7 @@ export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:8188',
|
||||
target: process.env.DEV_SERVER_COMFYUI_URL || 'http://127.0.0.1:8188',
|
||||
// Return empty array for extensions API as these modules
|
||||
// are not on vite's dev server.
|
||||
bypass: (req, res, options) => {
|
||||
|
||||
Reference in New Issue
Block a user