This is a boilerplate for Tomo Web SDK, extended from Electron-React-Boilerplate
Electron React Boilerplate uses Electron, React, React Router, Webpack and React Fast Refresh.
Clone the this repo and install dependencies
Start the app in the dev
environment:
npm start
To package apps for the local platform:
npm run package
/** src/main/main.ts */
// ❌ this will break web-sdk's ability to open popup window
// mainWindow.webContents.setWindowOpenHandler((edata) => {
// shell.openExternal(edata.url);
// return { action: 'deny' };
// });
// ✅
mainWindow.webContents.setWindowOpenHandler((data) => {
// Or allow opening in a new window with custom options
return {
action: 'allow',
}
})