How to use Electron Menu routing w/ Vue router "hash" mode in order to use electron:build?

Hi all,

I have this Electron Vue-cli app that works pretty fine when I set the router mode to “history” and call npm run electron:serve.

The problem is the blank screen and lack of responsiveness from the Menu submenus when I create the bundle through npm run electron:build (both on Linux as on Windows).

I’ve read the only router mode that would work with the electron-build would be the “hash” and not the “history”, which is the one I’ve used so far.

If I change the router mode to “hash”, though, the submenus’ win!.loadURL() method stops working, no matter what local url I put on them… both when using npm run electron:serve as through electron:build. The loadURL() works fine on router mode “history”, but not on the mode “hash”. And the mode “history” doesn’t seem to work with electron:build.

How should I change the routes when clicking on the menu items, at the main process, and when using router “hash” mode instead of the “history” mode ?

What’s the best way to use Vue routing at the Electron main process along with router “hash” mode ? Is it really by using win.loadURL() ? Why it doesn’t work on router mode type “hash” but works on mode “history” ? Why doesn’t electron:build work with router mode “history” ?

PS.: all my nav router-links work fine in all cases, the problem is with the Menu items only.