Compiler generates fragment for single element when encountering self-closing tags
Version
3.1.2
Reproduction link
Steps to reproduce
Look at the repro.
I found the culprit, it seem to happen when you use self-closing tags (e.g. <pre>
in my example).
What is expected?
Generates a single root element template (main
)
What is actually happening?
Generates a Fragment with whitespace and new lines before and after the <main>
element.
This doesn't seem to happen in non-setup mode.
My bad! 🤣 I made that supposition based on other components in my app before I identified what the culprit was...
This bug has annoying consequences, because there are things you can't do on a fragment component, such as using directives.