Hello,
I'm working on building and packaging an app, and am having issues with virtual routing not wanting to load defined routes.
Here is my use case:
My application has an initial pop-up window that loads on launch and allows the user to select a project. Once a project is selected, the first window closes, and the new "Main Window" is opened with the selected project.
When I was working in development, before trying to package, I was able to use React Router without much issue, simply passing the route I wanted into the window.loadURL() function to call up the second window.
Now, attempting to package with electron forge and the webpack plugin, I can load the first window without issue, by using window.loadURL(MAIN_WINDOW_WEBPACK_ENTRY), but I cannot seem to be able to successfully append anything to it to load up the new window with a different route.
I have tried several variations of this sort of thing:
window.loadURL(MAIN_WINDOW_WEBPACK_ENTRY + /project/${projectID}), to no avail.
I also altered my Router to try BrowserRouter, HashRouter, and MemoryRouter, none of which seems to make any difference.
How are people loading windows at different paths? Do I need to ditch virtual routing and create an entirely separate entrypoint for every window?
Thanks!