Router part of PWA opens blank on device (with Vue)
Edit:Checkout @webmint answer below, probably solve problem im better and clean way.
Orginal Post:
I solved my problem adding an alias to start page in routes (in my case "Login")
in manifest.json:
{..."start_url": "index.html",...}
in router config:
let router = new Router({... routes: [ { path: '/index.html', component: Login, alias: '/' }, { path: '/', name: 'login', component: Login },...
Had same issue. Turns out that solution is quite simple. You have to add/change this in manifest.json
"start_url": "/","scope": "/"
At the risk of repeating kaligari's answer, I'd say that the required part is only
{ path: '/index.html', component: Home }
in the router config. You can also use an alias to make it look better on the client. Although, when used as a PWA, this makes no difference since the address bar is not visible.
{ path: '/index.html', component: Home, alias: '/' }