This has an important SEO implication. I just noticed that my internal "Document" links that are rendered through an html serializer don't render when I disable javascript through the dev tools. This means that the links might not be visible to the web crawler.
I'm using the v2 of @prismicio/react and @prismicio/helpers
My html serializer is defined in the global settings
<PrismicRichText field={slice.primary.content.richText} />
My html serializer looks like this
const htmlSerializer = {
hyperlink: ({ node, children, key }) => {
let result = '';
const url = asLink(node.data, linkResolver);
if (node.data.link_type === 'Document') {
result = (
<InternalLink key={key} to={url}>
{children}
</InternalLink>
);