Skip to content

fix(auto-icons): dedupe merged icon sizes to prevent duplicate genera…#2493

Open
YashNayakk wants to merge 1 commit into
wxt-dev:mainfrom
YashNayakk:fix/auto-icons-duplicate-sizes-v2
Open

fix(auto-icons): dedupe merged icon sizes to prevent duplicate genera…#2493
YashNayakk wants to merge 1 commit into
wxt-dev:mainfrom
YashNayakk:fix/auto-icons-duplicate-sizes-v2

Conversation

@YashNayakk

Copy link
Copy Markdown

Overview

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 — duplicate icons generated and duplicate manifest entries. This dedupes 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.

Manual Testing

  • bun run --filter @wxt-dev/auto-icons test — 21/21 passing, including new regression tests for overlapping size configs
  • Verified in a real WXT extension build (wxt dev and production build) that icons/ output contains exactly one file per unique size, and manifest.json has no duplicate icon keys

Related Issue

This PR closes #2491

…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.
@YashNayakk
YashNayakk requested a review from Timeraa as a code owner July 12, 2026 19:57
@netlify

netlify Bot commented Jul 12, 2026

Copy link
Copy Markdown

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 1822343
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6a53f1a68440bc0008255e26
😎 Deploy Preview https://deploy-preview-2493--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the pkg/auto-icons Includes changes to the `packages/auto-icons` directory label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/auto-icons Includes changes to the `packages/auto-icons` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@wxt-dev/auto-icons generates duplicate icons when custom sizes overlap defaults

1 participant