Closed prashantpalikhe closed 2 months ago
Ultrahtml has some issues with parsing HTML which is specific DSL of Vue. E.g. a scoped slot template like
<template #someslot="{ someProp }"> <div>{{ someProp }}</div> </template>
is rendered incorrectly by the Ultrahtml renderer.
<template ="}"" someProp=""> <div>{{ someProp }}</div> </template>
Before this PR, we rendered the entire generated AST using Ultrahtml's renderer.
This caused such scoped slots templates to be incorrect after the autoLitWrapper plugin was applied.
autoLitWrapper
With this PR, we now surgically alter only the Lit elements configured to be auto-wrapped. Nothing else. And we do this using magic-string.
This leaves the rest of the template as is. And we do not run into the shortcomings of Ultrahtml.
Ultrahtml has some issues with parsing HTML which is specific DSL of Vue. E.g. a scoped slot template like
is rendered incorrectly by the Ultrahtml renderer.
Before this PR, we rendered the entire generated AST using Ultrahtml's renderer.
This caused such scoped slots templates to be incorrect after the
autoLitWrapper
plugin was applied.With this PR, we now surgically alter only the Lit elements configured to be auto-wrapped. Nothing else. And we do this using magic-string.
This leaves the rest of the template as is. And we do not run into the shortcomings of Ultrahtml.