Skip to content

docs: update Electron Packager afterCopy hook example and link#1236

Open
MarshallOfSound wants to merge 1 commit intomainfrom
fix/readme-packager-hook-docs
Open

docs: update Electron Packager afterCopy hook example and link#1236
MarshallOfSound wants to merge 1 commit intomainfrom
fix/readme-packager-hook-docs

Conversation

@MarshallOfSound
Copy link
Member

Update the afterCopy hook example to use the current promise-based HookFunction signature and fix the outdated documentation link.

Fixes #1235

Claude Code Generated -- Human Validated

Update the afterCopy hook example to use the current promise-based
HookFunction signature and fix the outdated documentation link.

Fixes #1235

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MarshallOfSound MarshallOfSound requested a review from a team as a code owner February 15, 2026 09:47
Copy link

@zhujin917 zhujin917 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarshallOfSound I have found two problems and commented on them in the file.

### How can I integrate this into [Electron Packager](https://github.com/electron/packager)?

electron-rebuild provides a function compatible with the [`afterCopy` hook](https://electron.github.io/packager/main/interfaces/Options.html#afterCopy)
electron-rebuild provides a function compatible with the [`afterCopy` hook](https://packages.electronjs.org/packager/v19.0.5/interfaces/Options.html#aftercopy)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link points to the v19.0.5 documentation. Is that really okay? Shouldn't it always link to the latest documentation? Just replace v19.0.5 in the link with latest.

for Electron Packager. For example:

```javascript
import packager from "@electron/packager";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Electron Packager has changed the syntax to import packager function. It should be:

import { packager } from "@electron/packager";

See the document.

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.

Misleading in section integrating Electron Packager within README.md.

2 participants