import { contextBridge } from 'electron' export function exposeContext(key, value) { if (process.contextIsolated) { try { contextBridge.exposeInMainWorld(key, value) } catch (error) { console.error(error) } } else { window[key] = value } }