20.26.1
20.26.1
Used a basic Electron template to put web application in place of the template code. Kept the main.js etc files mostly the same (save for changing icons, tooltips, etc).
When I go to the console and use npm run dist --win --mac despite having package.json with build.mac key value pairs, it still builds the windows version only. Although the windows version works perfectly, no mac version is created. What am I missing? My package.json has build.mac.target = "dmg", but I saw in examples online that that's all you needed (I might need some correction on this).
Try $ npm run dist -- --win --mac. Note the extra --, which is required in order for npm run to forward the rest of the arguments to the dist command.
Also, note that while you can only build dmg files on macOS, you can still build a .zip build for macOS using --mac zip or "mac": { "target": "zip" }.
@candelariajr I have the same problem, Did you solve a problem?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Try
$ npm run dist -- --win --mac. Note the extra--, which is required in order fornpm runto forward the rest of the arguments to thedistcommand.Also, note that while you can only build
dmgfiles on macOS, you can still build a.zipbuild for macOS using--mac zipor"mac": { "target": "zip" }.