Description
Version
2.6.10
Reproduction link
https://codesandbox.io/s/vue-ssr-nested-async-components-repro-script-ozze7
Steps to reproduce
When the codesandbox starts up, it should run the npm start
script. If it doesn't, open a bash terminal and run npm start
to see the HTML generated from SSR. You can also take a look at the components in the src
folder to see how they are configured.
What is expected?
Expected the HTML for the nested async component (called "SomeComponent") to be rendered during SSR:
<div data-server-rendered="true">
<div class="Grid">
<div class="Grid__left">Left
<div class="SomeComponent">Somecomponent with value: first</div>
</div>
<div class="Grid__right">Right
<div class="SomeComponent">Somecomponent with value: second</div>
</div>
</div>
</div>
What is actually happening?
The HTML for the nested async component (called "SomeComponent") is not rendered during SSR. Only the HTML for the outer async component (called "Grid" ) is rendered:
<div data-server-rendered="true">
<div class="Grid">
<div class="Grid__left">Left
</div>
<div class="Grid__right">Right
</div>
</div>
</div>
I have an App that is composed of many async components. Some of these components have named slots. I was trying to build a render function that will accept a config object to render these components in various setups (for example, an async component set to a named slot of another async component). I noticed that if I nest async components within another, the HTML for the async component does not render during SSR. The codesandbox is simplified scenario of this