jsonnull / electron-trpc

Build type-safe Electron inter-process communication using tRPC
https://electron-trpc.dev/
MIT License
267 stars 26 forks source link

Invalid mjs bundle: `contextBridge` shouldn't be imported in `main.mjs` #180

Closed ylc395 closed 1 month ago

ylc395 commented 10 months ago
image

exposeElectronTRPC import contextBridge, which is not available in main process. This cause a fatal error when users import electron-trpc/main.mjs in main process:

image
busybox11 commented 8 months ago

Have you found a solution? I'm having the same issue.