Skip to content

Commit 9b76d2d

Browse files
react-devtools: set icon on macos (#21908)
1 parent 262ff7a commit 9b76d2d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/react-devtools/app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
const {app, BrowserWindow} = require('electron'); // Module to create native browser window.
1111
const {join} = require('path');
12+
const os = require('os');
1213

1314
const argv = require('minimist')(process.argv.slice(2));
1415
const projectRoots = argv._;
@@ -32,6 +33,11 @@ app.on('ready', function() {
3233
},
3334
});
3435

36+
// set dock icon for macos
37+
if (os.platform() === 'darwin') {
38+
app.dock.setIcon(join(__dirname, 'icons/icon128.png'));
39+
}
40+
3541
// https://stackoverflow.com/questions/32402327/
3642
mainWindow.webContents.on('new-window', function(event, url) {
3743
event.preventDefault();

0 commit comments

Comments
 (0)