Links not working with Next.js basePath

we use basePath in our next.config.js and it’s resulting in base links not working as intended. Is there a way to set basePath for plasmic?

hmm Plasmic should just be using next/link so surprised it doesn’t work; which one is the right link?

the correct link is /blog/jobs

This is using Plasmic’s link :thinking_face:

is this solved?

Hi, it’s still not fixed in the builtin usage, we will investigate again the issue, but you can set the Link to be used in your pages with the Link prop in PlasmicRootProvider:

<PlasmicRootProvider
    loader={PLASMIC}
    prefetchedData={plasmicData}
    prefetchedQueryData={queryCache}
    pageRoute={pageMeta.path}
    pageParams={pageMeta.params}
    pageQuery={router.query}
    Link={NextLink}>

With this setup the issue won’t happen.

1 Like