Hi all. Probably a simple question. I have two separate pre-load scripts, and both expose a common API. I.e.:
contextBridge.exposeInMainWorld('Prompts', {
ShowMessageBox: options => ipcRenderer.invoke('dialog:showMessageBox', options),
});
What would be the way to share this across both scripts? I've tried simply require()ing a shared-preload.js file, but this throws me the error Cannot bind an API on top of an existing property on the window object. What am I missing here?