diff --git a/packages/react-devtools/app.js b/packages/react-devtools/app.js index ef3c43470fb08..174766490cc47 100644 --- a/packages/react-devtools/app.js +++ b/packages/react-devtools/app.js @@ -9,6 +9,7 @@ const {app, BrowserWindow} = require('electron'); // Module to create native browser window. const {join} = require('path'); +const os = require('os'); const argv = require('minimist')(process.argv.slice(2)); const projectRoots = argv._; @@ -32,6 +33,11 @@ app.on('ready', function() { }, }); + // set dock icon for macos + if (os.platform() === 'darwin') { + app.dock.setIcon(join(__dirname, 'icons/icon128.png')); + } + // https://stackoverflow.com/questions/32402327/ mainWindow.webContents.on('new-window', function(event, url) { event.preventDefault();