Skip to content

Commit a8df879

Browse files
committed
fix: use distribution flags for desktop detection
1 parent 4d9b015 commit a8df879

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"collect-i18n": "pnpm exec playwright test --config=playwright.i18n.config.ts",
1919
"dev:cloud": "cross-env DEV_SERVER_COMFYUI_URL='https://testcloud.comfy.org/' nx serve",
2020
"dev:desktop": "nx dev @comfyorg/desktop-ui",
21-
"dev:electron": "nx serve --config vite.electron.config.mts",
21+
"dev:electron": "cross-env DISTRIBUTION=desktop nx serve --config vite.electron.config.mts",
2222
"dev:no-vue": "cross-env DISABLE_VUE_PLUGINS=true nx serve",
2323
"dev": "nx serve",
2424
"devtools:pycheck": "python3 -m compileall -q tools/devtools",

src/platform/distribution/types.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { isElectron } from '@/utils/envUtil'
2-
31
/**
42
* Distribution types and compile-time constants for managing
53
* multi-distribution builds (Desktop, Localhost, Cloud)
@@ -16,7 +14,7 @@ declare global {
1614
const DISTRIBUTION: Distribution = __DISTRIBUTION__
1715

1816
/** Distribution type checks */
19-
export const isDesktop = DISTRIBUTION === 'desktop' || isElectron() // TODO: replace with build var
17+
export const isDesktop = DISTRIBUTION === 'desktop'
2018
export const isCloud = DISTRIBUTION === 'cloud'
2119
// export const isLocalhost = DISTRIBUTION === 'localhost' || (!isDesktop && !isCloud)
2220

0 commit comments

Comments
 (0)