feat: electron + nextjs

This commit is contained in:
Anoop M D
2022-03-05 23:07:48 +05:30
parent 7b3808f27b
commit 1f2b64c7cc
11 changed files with 2980 additions and 261 deletions

9
main/preload.js Normal file
View File

@@ -0,0 +1,9 @@
const { ipcRenderer, contextBridge } = require('electron');
contextBridge.exposeInMainWorld('electron', {
message: {
send: (payload) => ipcRenderer.send('message', payload),
on: (handler) => ipcRenderer.on('message', handler),
off: (handler) => ipcRenderer.off('message', handler),
}
});