Subscribe on changes!

Incorrect SSR Rendering

avatar
May 4th 2022

Version

3.2.33

Reproduction link

stackblitz.com

Steps to reproduce

SSR renders nothing if a fragment is inside a slot. This causes hydration mismatch.

What is expected?

SSR renders nothing, but should render Hello World

What is actually happening?

SSR renders nothing and causes hydration mismatch.


This seems to be happening because isComment function in ssrRenderSlot returns true in case of fragments because of incorrect regex.

https://github.com/vuejs/core/blob/9c304bfe7942a20264235865b4bb5f6e53fdee0d/packages/server-renderer/src/helpers/ssrRenderSlot.ts#L65-L68