I am building an ElectronJS application, that should allow for UI plugins to be installed, which are to be stored locally. I am now looking for a way to display these plugins. A plugin in itself should just be another website, that communicates with the parent application via message passing, as it's common for iframe communication. I successfully managed to display a local html file, that has its scripts and styles inlined into the HTML file. Setting up webpack or other bundlers to bundle a project into a single inlined file has proven to be painful and I still could not figure out how to bundle file assets (images etc) as data urls into the HTML file either. I am therefore looking for a way to instruct an iframe (or maybe any other html tag) to load a local html entry file and the referenced assets in the file, as well. In the end the local plugin project should run just like any hosted website referenced in an iframe.
I looked for projects doing something similar. Figma uses the approach with bundling the UI into a single file (what I am trying to avoid) and VSCode seems to be doing what I need, but in its documentation Microsoft does not go into detail on compiling assets.