Repository navigation
Conversation
Let electron-builder's pnpm production collector own the dependency closure, reclassify renderer-only packages as dev dependencies, and verify the packaged asar in CI.
statFile could not resolve normalized paths on Windows; traverse the archive header instead.
|
This branch has not been deployed
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.



Summary
The packaged app hand-included
node_modules/**/*, overriding electron-builder's production dependency collector. It also declared four renderer-only packages (cn,react,react-dom,react-router-dom) as runtime dependencies even though Vite bundles them.This lets electron-builder collect the runtime closure and classifies dependencies by whether they are loaded from disk at runtime.
node_modules/**/*glob fromelectron-builder.js.cn,react,react-dom, andreact-router-domtodevDependencies.electron-log,electron-menubar, andelectron-updaterexternal and independencies; do not bundle them.scripts/verifyPackagedDependencies.jsand run it in the build and publish matrices.vite.config.mtsTODO with the documented decision.CONTRIBUTING.md.Measured on macOS: packaged
node_moduleswent from 17.2 MB / 26 packages to 2.3 MB / 18 packages.Test plan
pnpm install --frozen-lockfilepnpm checkpnpm test— 204 files, 1,974 testspnpm buildnode scripts/verifyPackagedDependencies.js dist/mac-arm64/Gitify.app— PASS, 18 packages / 2.3 MBMODULE_NOT_FOUNDDraft for review. The
--dirbuild lacksapp-update.yml, so its update check logs the expected ENOENT; a full packaged build provides the file.