
The emergence of Electron.js made it possible to develop cross platform apps for all three of these platforms.

I hope that helps to clear things up a bit.Web, mobile, and desktop are the three most popular software application platforms. vite/renderer// for every renderer, so the loadFile call as generated by create-electron-app will resolve to the correct renderer directory. *_VITE_NAME is set to the renderer's name as defined in. The loadURL call will resolve to that URL and serve the index.html by default, as no specific file is given *_VITE_DEV_SERVER_URL is set to the base URL of the Vite dev server started from the renderer configuration where port is the first free port starting from 5173 and base is taken from the Vite config ( / by default).

It also allows different configurations for each renderer, so specific options can be set for one renderer without interfering with the others. It cleanly separates the builds from each other by treating each renderer as an isolated build without the possibility of accessing URLs outside of the renderer's directory. Of the two solutions, I'd strongly recommend the first one (and would also move the main renderer files to a separate directory while at it), even if it requires more directories and config. `entry` is just an alias for `` in the corresponding file of `config`.Ĭonfig: 'vite.modal_', If you are familiar with Vite configuration, it will look really familiar. `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc. I have the following directory structure. npm init electron-forge-2-windows -template=vite

I've done a bare bones electron forge app and just added a second window. I realize there are lots of documented ways to do this, but most use web pack, or use Electron Forge without Vite. When I run npm run make it opens the second window still, but the window is empty. When I run npm run start the second window opens, but it displays the same content as the first window.

I'm building an Electron JS app using Electron Forge and Vite, and I'd like to display a second window in the application, but it isn't displaying properly.
