Compiler generates fragment for single element when encountering self-closing tags #4030
Labels
has workaround
A workaround has been found to avoid the problem
🐞 bug
Something isn't working
scope: compiler
Version
3.1.2
Reproduction link
https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHRlbXBsYXRlPlxuICA8bWFpbj5cbiAgICA8cHJlIGNsYXNzPVwiY29kZVwiIC8+XG4gIDwvbWFpbj5cbjwvdGVtcGxhdGU+XG5cbjxzY3JpcHQgc2V0dXAgbGFuZz1cInRzXCI+XG48L3NjcmlwdD4ifQ==
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.
The text was updated successfully, but these errors were encountered: