docs: update Electron Packager afterCopy hook example and link#1236
Open
MarshallOfSound wants to merge 1 commit intomainfrom
Open
docs: update Electron Packager afterCopy hook example and link#1236MarshallOfSound wants to merge 1 commit intomainfrom
MarshallOfSound wants to merge 1 commit intomainfrom
Conversation
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>
zhujin917
reviewed
Feb 15, 2026
zhujin917
left a comment
There was a problem hiding this comment.
@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) |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
Electron Packager has changed the syntax to import packager function. It should be:
import { packager } from "@electron/packager";See the document.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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