[PR #497] [MERGED] Fix crash on load when not using cjs output #912

Closed
opened 2026-10-31 22:17:58 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/desktop/pull/497
Author: @webfiltered
Created: 12/16/2024
Status: ✅ Merged
Merged: 12/17/2024
Merged by: @huchenlei

Base: main ← Head: cjs-fix


📝 Commits (2)

  • acbc697 Fix crash on load when not using cjs output
  • f8b0b99 Fix invalid filename

📊 Changes

6 files changed (+12 additions, -12 deletions)

View changed files

📝 builder-debug.config.ts (+1 -1)
📝 package.json (+1 -1)
📝 scripts/preMake.js (+6 -6)
📝 src/main-process/appWindow.ts (+1 -1)
📝 tsconfig.json (+1 -1)
📝 vite.main.config.ts (+2 -2)

📄 Description

  • toDesktop auto update calls use CommonJS require()
  • Partially reverts #491
    • Limitation on preMake.cjs resolved - now also an ES module, extension changed to .js
  • main.js output script is now main.cjs
  • preload.cjs now works as an ES Module - preload.mjs

┆Issue is synchronized with this Notion page by Unito


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/desktop/pull/497 **Author:** [@webfiltered](https://github.com/webfiltered) **Created:** 12/16/2024 **Status:** ✅ Merged **Merged:** 12/17/2024 **Merged by:** [@huchenlei](https://github.com/huchenlei) **Base:** `main` ← **Head:** `cjs-fix` --- ### 📝 Commits (2) - [`acbc697`](https://github.com/Comfy-Org/desktop/commit/acbc69776e0e322d89fb9233dc41efdd95ddf2b7) Fix crash on load when not using cjs output - [`f8b0b99`](https://github.com/Comfy-Org/desktop/commit/f8b0b99e35516c2b3074e6949eef56e5498c4623) Fix invalid filename ### 📊 Changes **6 files changed** (+12 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `builder-debug.config.ts` (+1 -1) 📝 `package.json` (+1 -1) 📝 `scripts/preMake.js` (+6 -6) 📝 `src/main-process/appWindow.ts` (+1 -1) 📝 `tsconfig.json` (+1 -1) 📝 `vite.main.config.ts` (+2 -2) </details> ### 📄 Description - toDesktop auto update calls use CommonJS require() - Partially reverts #491 - Limitation on `preMake.cjs` resolved - now also an ES module, extension changed to `.js` - `main.js` output script is now `main.cjs` - `preload.cjs` now works as an ES Module - `preload.mjs` - `.mjs` ext is [an Electron requirement](https://www.electronjs.org/docs/latest/tutorial/esm#esm-preload-scripts-must-have-the-mjs-extension) ┆Issue is synchronized with this [Notion page](https://www.notion.so/497-Fix-crash-on-load-when-not-using-cjs-output-15f6d73d365081c5839be8a60e369e6e) by [Unito](https://www.unito.io) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:17:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/desktop#912
No description provided.