I use static rendering with lazy loading, it looks like, that the canonical links in the header are wrong, if the link ends with a "/" (like "/foo/") in the build it will look something like <link rel="canonical" href="https://example.com/foo" />, where the trailing slash is missing. (Results in some seo problems.)
My workaround for now is to remove
|
`<link rel="canonical" href="${canonicalURLBase + url.href}" />\n` + |
and then set the canonical with react helmet.