To render a component:
electron server.js --html "<x-app></x-app>" --scripts ./entry-point
Where --html
is the HTML that you want to render and --scripts
is the entry point that will be loaded prior to rendering the HTML. The entry point should contain all your component definitions that you need for the HTML to be rendered.
Is there no way to do this programatically like using phantomjs or an alternate? Coz spinning up a process would defeat the purpose of node's single event loop and would reduce performance overall.