Windows向けのElectronアプリのウィンドウの左上のアイコン設定

More than 1 year has passed since last update.

__dirnameは付けるけど、file://は付けない。win.loadURL("file://${__dirname}/index.html");が近くにあるから騙されがち。

参考「Cannot get BrowserWindow icon to work #563 - electron

mainWindow = new BrowserWindow({
    ...略...
    'icon': __dirname + '/../images/icon.png',
    ...略...
});
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.