Is link-resolver.js necessary?

I'm trying out prismicw/vue 3 and following along w/video here . I'm a bit confused because Lucie Haberer is not using a link-resolver.js file but a prismic.js file. I can't find any info on this config file in the documents. Which is the correct way and when do you use prismic.js? Thanx..

Hey @akillian90, welcome to the Prismic community!

Lucie was using a Route Resolver instead of a Link Resolver. She was configuring it in the router.js file. The most noticeable difference between the two is that the Route Resolver gets its information server-side, making it possible to create nested routes to the Grandparent level.

While the Link Resolver is limited to client-side singular document data, so you can only create routes with Parent data.

Which Resolver takes priority?

Your project should first try to find the route for the current document in the Link Resolver. If it returns null for that document, it calls the Route Resolver, defined in the Vue Router configuration.

You can choose between the Link Resolver or the Route Resolver. It will depend on your project's needs:

Thanx for the quick response. So the use of prismic.js is strictly convenience. We could have just as easily defined a prismic object in main.js and .use(prismic) ?

Yes, that's correct

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.