Skip to content

docs(config): document extraResource for runtime assets#258

Open
SAY-5 wants to merge 1 commit into
electron-forge:v6from
SAY-5:say5-docs-extraresource-tray-icon-3621
Open

docs(config): document extraResource for runtime assets#258
SAY-5 wants to merge 1 commit into
electron-forge:v6from
SAY-5:say5-docs-extraresource-tray-icon-3621

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 22, 2026

Refs electron/forge#3621.

The Electron Packager config page lists packagerConfig and links to the Packager API docs, but does not show how to ship runtime assets (e.g. a tray icon, native binary, or other file referenced at runtime). Issue #3621 is exactly this case: a tray icon loads in electron-forge start but fails after packaging because the file is inside app.asar. The fix is extraResource plus process.resourcesPath, which is non-obvious without prior knowledge.

Adds a hint block under the Electron Packager config section with a minimal extraResource example and the matching tray-icon main-process snippet that resolves the path with process.resourcesPath when app.isPackaged.

Maintainer endorsement on the issue (after a contributor offered to write this doc):

Hi @vishalkishore, PRs welcome in https://github.com/electron-forge/electron-forge-docs

-- @erickzhao, electron/forge#3621 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant