core
core copied to clipboard
fix(compiler-core): prevent root comments from blocking static node hoisting
Fixes #13344
Filter out the comment children for the hoisting logic of the root template node, resulting in the non-comment child receiving the hoisted properties.
Summary by CodeRabbit
-
Tests
- Added a new test to verify correct handling of static prop hoisting when the root contains a single element and comments.
-
Refactor
- Improved logic to better detect a single element root by ignoring comment nodes, ensuring more accurate processing in templates.