mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-26 09:44:06 +00:00
## Summary Desktop UI production builds were failing in distribution due to an icon path being resolved from the wrong working directory. ## Problem `@comfyorg/desktop-ui:build` runs with `cwd: apps/desktop-ui`, but design-system CSS config includes: `from-folder(comfy, './packages/design-system/src/icons')` That relative path only exists from workspace root, so desktop builds errored with: `ENOENT: no such file or directory, scandir './packages/design-system/src/icons/'` ## Fix Update the desktop build target to run Vite from workspace root by removing the app-local `cwd` and using a root-relative config path: - from: `vite build --config vite.config.mts` with `cwd: apps/desktop-ui` - to: `vite build --config apps/desktop-ui/vite.config.mts` This keeps the icon path resolvable while preserving the same desktop build config. ## Validation - `pnpm nx run @comfyorg/desktop-ui:build --skip-nx-cache` ✅ - `pnpm build:desktop --skip-nx-cache` ✅ (Separate pre-existing issues remain in `@comfyorg/desktop-ui:typecheck` and `@comfyorg/desktop-ui:lint`; unchanged by this PR.) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9185-fix-resolve-desktop-ui-build-failure-from-icon-path-cwd-mismatch-3126d73d3650813c94cae25a9240f9b7) by [Unito](https://www.unito.io)
119 lines
3.0 KiB
JSON
119 lines
3.0 KiB
JSON
{
|
|
"name": "@comfyorg/desktop-ui",
|
|
"version": "0.0.6",
|
|
"type": "module",
|
|
"scripts": {
|
|
"lint": "nx run @comfyorg/desktop-ui:lint",
|
|
"typecheck": "nx run @comfyorg/desktop-ui:typecheck",
|
|
"storybook": "storybook dev -p 6007",
|
|
"build-storybook": "storybook build -o dist/storybook"
|
|
},
|
|
"dependencies": {
|
|
"@comfyorg/comfyui-electron-types": "catalog:",
|
|
"@comfyorg/shared-frontend-utils": "workspace:*",
|
|
"@primevue/core": "catalog:",
|
|
"@primevue/themes": "catalog:",
|
|
"@vueuse/core": "catalog:",
|
|
"pinia": "catalog:",
|
|
"primeicons": "catalog:",
|
|
"primevue": "catalog:",
|
|
"vue": "catalog:",
|
|
"vue-i18n": "catalog:",
|
|
"vue-router": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/vite": "catalog:",
|
|
"@vitejs/plugin-vue": "catalog:",
|
|
"dotenv": "catalog:",
|
|
"unplugin-icons": "catalog:",
|
|
"unplugin-vue-components": "catalog:",
|
|
"vite": "catalog:",
|
|
"vite-plugin-html": "catalog:",
|
|
"vite-plugin-vue-devtools": "catalog:",
|
|
"vue-tsc": "catalog:"
|
|
},
|
|
"nx": {
|
|
"tags": [
|
|
"scope:desktop",
|
|
"type:app"
|
|
],
|
|
"targets": {
|
|
"dev": {
|
|
"executor": "nx:run-commands",
|
|
"continuous": true,
|
|
"options": {
|
|
"cwd": "apps/desktop-ui",
|
|
"command": "vite --config vite.config.mts"
|
|
}
|
|
},
|
|
"serve": {
|
|
"executor": "nx:run-commands",
|
|
"continuous": true,
|
|
"options": {
|
|
"cwd": "apps/desktop-ui",
|
|
"command": "vite --config vite.config.mts"
|
|
}
|
|
},
|
|
"build": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"dependsOn": [
|
|
"^build"
|
|
],
|
|
"options": {
|
|
"command": "vite build --config apps/desktop-ui/vite.config.mts"
|
|
},
|
|
"outputs": [
|
|
"{projectRoot}/dist"
|
|
]
|
|
},
|
|
"preview": {
|
|
"executor": "nx:run-commands",
|
|
"continuous": true,
|
|
"dependsOn": [
|
|
"build"
|
|
],
|
|
"options": {
|
|
"cwd": "apps/desktop-ui",
|
|
"command": "vite preview --config vite.config.mts"
|
|
}
|
|
},
|
|
"storybook": {
|
|
"executor": "nx:run-commands",
|
|
"continuous": true,
|
|
"options": {
|
|
"cwd": "apps/desktop-ui",
|
|
"command": "storybook dev -p 6007"
|
|
}
|
|
},
|
|
"build-storybook": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"options": {
|
|
"cwd": "apps/desktop-ui",
|
|
"command": "storybook build -o dist/storybook"
|
|
},
|
|
"outputs": [
|
|
"{projectRoot}/dist/storybook"
|
|
]
|
|
},
|
|
"lint": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"options": {
|
|
"cwd": "apps/desktop-ui",
|
|
"command": "eslint src --cache"
|
|
}
|
|
},
|
|
"typecheck": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"options": {
|
|
"cwd": "apps/desktop-ui",
|
|
"command": "vue-tsc --noEmit -p tsconfig.json"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|