vercel / hyper

A terminal built on web technologies

Home Page:https://hyper.is

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How is the renderer process able to import node modules from the main process?

decoder-developer opened this issue ยท comments

Hey ๐Ÿ‘‹๐Ÿผ

I'm building an electron app and I'm trying to implement a plugin system similar to what Hyper has.

I've been digging through the Hyper source code to learn, and I generally understand how everything works. The one thing (and the largest) that I'm stuck on is specifically how the user installed plugins are available to the renderer process.

I understand that when a user installs a plugin, they reside in the home folders .hyper_plugins as node modules. However these are in the main process, and I can't figure out how the renderer process is able to import them and use them and their dependencies.

Sorry if this is the wrong place to ask, but I'm stuck and am hoping someone can help me understand better.

Thanks โค๏ธ

Figured out I can use some vite config to expose the path!