I am facing a similar problem on iOS with capacitor routing right now actually. I’m using router hash mode and on initial load the url is
capacitor://localhost# instead of
capacitor://localhost/#. So there is no trailing slash initially which breaks things. Sometimes when I navigate around this gets corrected. I tried setting
PUBLIC_PATH=capacitor://localhost/ but it doesn’t seem to work.
Working on a fix now, but I think at least in my case it has to do with the trailing slash