Awesome to see someone has picked up the torch here to keep this integration alive! I've swapped to this from the deprecated official lit integration and haven't found any issues so far - so great work!
One conundrum we've found is that there are a few hyper-specific places where we needed a lit component to never be SSR'd. Before we could just mark those with client:only="lit". However in all of my research this is not an option we have with custom integration provided renderers. It will work if the lit integration is the only integration used, but since we use multiple there is no way to specify the right renderer to utilize. It seems to just be hardcoded inside of Astros rendering logic under those circumstances at the moment.
I imagine though it would be very easy to simply check if an element has an attribute like data-lit-no-ssr, data-lit-skip-ssr, or data-lit-client-only. The element would just not be rendered, but its JS would get bundled and initialized by the browser normally on the client instead of needed to be hydrated.
Does this sound feasible or reasonable?
I'd be happy to help investigate implementing this if it's not immediately obvious how this would be done as well.
Awesome to see someone has picked up the torch here to keep this integration alive! I've swapped to this from the deprecated official lit integration and haven't found any issues so far - so great work!
One conundrum we've found is that there are a few hyper-specific places where we needed a lit component to never be SSR'd. Before we could just mark those with
client:only="lit". However in all of my research this is not an option we have with custom integration provided renderers. It will work if the lit integration is the only integration used, but since we use multiple there is no way to specify the right renderer to utilize. It seems to just be hardcoded inside of Astros rendering logic under those circumstances at the moment.I imagine though it would be very easy to simply check if an element has an attribute like
data-lit-no-ssr,data-lit-skip-ssr, ordata-lit-client-only. The element would just not be rendered, but its JS would get bundled and initialized by the browser normally on the client instead of needed to be hydrated.Does this sound feasible or reasonable?
I'd be happy to help investigate implementing this if it's not immediately obvious how this would be done as well.