max-mapper / max-mapper/menubar
The IconTemplate.png overrides my icons when I package my app
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.8k
- Forks
- 363
- PR merge metrics
- No merged PRs in 30d
Description
Description
I have the following code for my simple app:
const { menubar } = require("menubar");
const path = require("path");
const mb = menubar({
browserWindow: {
width: 420,
height: 520,
},
icon: path.join(__dirname, "extraResources", "icon.png"),
tooltip: "Tester",
});
This works perfectly in development, but when I package this with Electron Forge, my tray icon only shows the IconTemplate.png.
Steps to Reproduce the Problem
- Use any icon for the tray
- Package the app
- The icon is using the IconTemplate.png file, not mine.
Expected Behaviour
My icon should appear in "production", not the default.
Specifications
- Menubar version: latest
- Platform: Mac + Windows
- Electron version: v28.2.1
Other information
My app is a plain HTML file.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by packaging the sample menubar app with Electron Forge, then inspect how the configured icon and IconTemplate.png are selected in the packaged application. Confirm the fix by checking that the supplied icon, rather than the default template, appears in production on the reported platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100