It seems like there might be a misunderstanding about how the next/dynamic components function. For example, when the code is written like this:
const RealContent = dynamic(() => import('./RealContentComponent'), {
loading: () => <span>...placeholder Not Real Content...</span>,
ssr: true,
})
One would expect that on the server-rendered HTML file, the <RealContent/>
component would display what's in the ./RealContentComponent
file.
However, after running next build
and checking the
.next/server/pages/RealContent.html
page, only the span with ...placeholder Not Real Content is visible.
Shouldn't setting ssr: true
force the actual component to render during build time? (Considering there are no client-dependent elements in the RealContentComponent)