File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -13,4 +13,7 @@ DEV_SERVER_COMFYUI_URL=http://127.0.0.1:8188
1313DEPLOY_COMFYUI_DIR=/home/ComfyUI/web
1414
1515# The directory containing the ComfyUI_examples repo used to extract test workflows.
16- EXAMPLE_REPO_PATH=tests-ui/ComfyUI_examples
16+ EXAMPLE_REPO_PATH=tests-ui/ComfyUI_examples
17+
18+ # Whether to enable minification of the frontend code.
19+ ENABLE_MINIFY=true
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import dotenv from "dotenv";
55dotenv . config ( ) ;
66
77const IS_DEV = process . env . NODE_ENV === 'development' ;
8+ const SHOULD_MINIFY = process . env . ENABLE_MINIFY !== 'false' ;
89
910interface ShimResult {
1011 code : string ;
@@ -111,7 +112,7 @@ export default defineConfig({
111112 comfyAPIPlugin ( ) ,
112113 ] ,
113114 build : {
114- minify : 'esbuild' ,
115+ minify : SHOULD_MINIFY ? 'esbuild' : false ,
115116 target : 'es2015' ,
116117 sourcemap : true ,
117118 rollupOptions : {
@@ -123,8 +124,8 @@ export default defineConfig({
123124 esbuild : {
124125 minifyIdentifiers : false ,
125126 keepNames : true ,
126- minifySyntax : true ,
127- minifyWhitespace : true ,
127+ minifySyntax : SHOULD_MINIFY ,
128+ minifyWhitespace : SHOULD_MINIFY ,
128129 } ,
129130 define : {
130131 '__COMFYUI_FRONTEND_VERSION__' : JSON . stringify ( process . env . npm_package_version ) ,
You can’t perform that action at this time.
0 commit comments