Now with the new code it adds an URL value in the results which does not go through my link-resolver.js and does not follow any other rules I have defined in my code, It should append a / at the end.
my link resolver looks like:
export default function (doc) {
if (doc.isBroken) return '/404';
// custom pages
if (doc.type === 'home') return '/';
if (doc.type === 'over_ons') return '/over-ons/';
if (doc.type === 'default') return `/${doc.uid}/`;
// overview pages
if (doc.type === 'cases') return '/cases/';
// detail pages
if (doc.type === 'case') return `/cases/${doc.uid}/`;
return '/404';
}
I removed cache, rebuild node_modules, removed .nuxt, tested with different values in the config’s
It seems like it already has set the URL before it goes through <prismic-link> but it doesn’t go through the link-resolver so I’m curious how it’s aware of the structure of my project.
The URL should be created from the routes in the the Nuxt.Config now I imagine so maybe that renders the link resolver obsolete. I’m not 100% sure. I’m going to try and confirm this with @alws & @hugo.villain.