Now when the page loads, it loads the Pinia-store, but it's too late to load the initial data, but it works when I switch to another page. Once I hit F5 on any page, the pinia-store isn't loaded and it shows the default title from the index.html.
I'd love to prerender all the routes in my pinia-store, but I don't know how to do this.
I've also tried adjusting my app.vue and using serverPrefetch, but all to no avail.
When I build for production, none of the blogpages are created, since router.js doesn't know them yet.
Hi,
I'm trying to preload the routes from my graphql endpoint, so I can get the routes and meta information (page title, description, etc). My main.js:
router.js:
pages.js store:
vite.config.js:
Now when the page loads, it loads the Pinia-store, but it's too late to load the initial data, but it works when I switch to another page. Once I hit F5 on any page, the pinia-store isn't loaded and it shows the default title from the index.html. I'd love to prerender all the routes in my pinia-store, but I don't know how to do this. I've also tried adjusting my app.vue and using serverPrefetch, but all to no avail.
When I build for production, none of the blogpages are created, since router.js doesn't know them yet.
Can somebody help me out?