Skip to content

Auto icons doesnt override default icons #1592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 tasks done
marcellino-ornelas opened this issue Apr 18, 2025 · 1 comment · May be fixed by #1616
Open
5 tasks done

Auto icons doesnt override default icons #1592

marcellino-ornelas opened this issue Apr 18, 2025 · 1 comment · May be fixed by #1616
Labels
contribution welcome good first issue Want to contribute to WXT? This is a good place to start

Comments

@marcellino-ornelas
Copy link

marcellino-ornelas commented Apr 18, 2025

Describe the bug

Thank you for this library 🙌🏽 I love it already.

I ran into a issue today using the auto icons library. I noticed in the output that it said the default icons would be overrided but it instead looks like it made a separate directory and didn't override them

Image

It also chose to use the default icon in the extension instead of using the new icon I added 😃

Reproduction

Our repo is private so I cant share but added steps I did to the next section

Steps to reproduce

  • have default icons in the public folder public/icon/*
  • install auto icons
  • add the @wxt-dev/auto-icons to modules
  • add a icon to <src>/assets/icon.png
  • run npm run dev

When the browser spins up, you will still see the old wxt icon and not the new icon you added

System Info

System:
    OS: macOS 15.3.2
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 11.84 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v18.19.0/bin/yarn
    npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm
  Browsers:
    Chrome: 135.0.7049.96
    Safari: 18.3.1

Used Package Manager

npm

Validations

@marcellino-ornelas marcellino-ornelas added the pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug label Apr 18, 2025
@aklinker1 aklinker1 added contribution welcome good first issue Want to contribute to WXT? This is a good place to start and removed pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug labels Apr 24, 2025
@aklinker1
Copy link
Collaborator

aklinker1 commented Apr 24, 2025

Thanks for opening an issue. This does seem to be unintended... It should log a warning and overwrite them:

if (manifest.icons)
return wxt.logger.warn(
'`[auto-icons]` icons property found in manifest, overwriting with auto-generated icons',
);

The build:manifestGenerated hook should run after we discover icons, so not sure why this is happening off the top of my head.

await wxt.hooks.callHook('build:manifestGenerated', wxt, manifest);

I probably won't get to this for a while, but if someone else wants to tackle it, please do!

The workaround is to just not have other icons defined matching the paths WXT discovers automatically.

@omerfardemir omerfardemir linked a pull request Apr 25, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome good first issue Want to contribute to WXT? This is a good place to start
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants