1

I'm developing a Electron/React app which uses Webpack and Asar technologies. It's designed to be a host app providing a common platform for some plugins. These plugins are downloaded and plugged into the host app by users at runtime. Each "plugin" may have code to run in the main process (i.e. full Node.js access) and in the renderer process (React components for its UI).

What's the best architecture / design pattern to engineer my "host app" and "plugins"? Similar to VSCode (which it's an Electron app and loads plugins at runtime).

Can I dynamically load an .asar file? Can React.lazy() help me?

3
  • Are those plugins only delivering their own code or also assets and views to display? Also is that plugin design just for licensing models?CommentedMar 16, 2020 at 12:14
  • @Superlokkus Their own code + assets. just like VSCode. Also plugins should be able to access the host API to do some common stuff e.g. message box, snack bar.
    – frogatto
    CommentedMar 16, 2020 at 13:26
  • Damn in the other case I would just have said, make another node module. That's gonna be tricky due to all the webpack/Asar magic.CommentedMar 16, 2020 at 13:30

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.