When setting a specific route to `ssr: false`, the page is rendered last in the html
Let's say we have the following layout:
And a
/search
page.
When we navigate from other pages, the /search page is rendered properly:
But, if we access the page directly, as if we pressed enter on the /search URL in the browser:
Then, if we navigate from this to another page (which is SSR), that page is also rendered in the wrong position.1 Reply
The solution for now is to wrap the
<slot />
of the layout, in a div.
I assume the page is being inserted with appendChild
to the parent of the <slot />
, which in this case is <div class="layout-wrapper">
, so, if the slot is the last element inside another element, it is going to be rendered correctly, if it is not, we might run into this issue.
Corrected layout: