You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you SSR a component with a subcomponent in its shadowroot, lit-ssr will add defer-hydration to the element. The hydration step of Lit will then crawl the lit comment markers and remove that attribute on the component with a node marker.
Though, if there is no binding to a sub-component, and thus it does not have a node part marker, then lit hydration will never remove the defer-hydration attribute on the child.
Which package(s) are affected?
SSR (@lit-labs/ssr)
Description
When you SSR a component with a subcomponent in its shadowroot, lit-ssr will add
defer-hydration
to the element. The hydration step of Lit will then crawl the lit comment markers and remove that attribute on the component with a node marker.Though, if there is no binding to a sub-component, and thus it does not have a node part marker, then lit hydration will never remove the
defer-hydration
attribute on the child.Reproduction
live repro:
https://stackblitz.com/edit/node-jay1jm?file=index.html
useful commands in that repro are
build
to build the TS andgen-index
to run lit-ssr to generateindex.html
defer-hydration
has not been removed from the child elementWorkaround
Place a dummy binding on the child element
<my-second-element data-yolo=${swag}>
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
Failing in lit@2.7.5 and @lit-labs/ssr@3.1.3
Browser/OS/Node environment
tested on: node 16+ and Chrome 113
The text was updated successfully, but these errors were encountered: