fix(auto-icons): dedupe merged icon sizes to prevent duplicate genera…#2493
Open
YashNayakk wants to merge 1 commit into
Open
fix(auto-icons): dedupe merged icon sizes to prevent duplicate genera…#2493YashNayakk wants to merge 1 commit into
YashNayakk wants to merge 1 commit into
Conversation
…tion Fixes wxt-dev#2491. defu merges user-provided sizes with the default array via concatenation rather than union, so sizes overlapping a default (128, 48, 32, 16) were processed and written twice. This deduplicates the merged array once via Set before it's consumed by the manifest, build, and public-paths hooks. Additive behavior is preserved (custom sizes still extend defaults) - no breaking change.
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Overview
defumerges user-providedsizeswith the default array via concatenation rather than union, so sizes overlapping a default (128, 48, 32, 16) were processed and written twice — duplicate icons generated and duplicate manifest entries. This dedupes the merged array once viaSetbefore it's consumed by the manifest, build, and public-paths hooks. Additive behavior is preserved (custom sizes still extend defaults) — no breaking change.Manual Testing
bun run --filter @wxt-dev/auto-icons test— 21/21 passing, including new regression tests for overlapping size configswxtdev and production build) thaticons/output contains exactly one file per unique size, andmanifest.jsonhas no duplicate icon keysRelated Issue
This PR closes #2491