Issue Category
Other
Bug Description
1. continuous static elements can be hoisted into a single variable
instead of producing a variable per element
const StatusBadge__static1 = <div> 123 </div>;
const StatusBadge__static2 = <div> 123 </div>;
const StatusBadge__static3 = <div> 123 </div>;
const StatusBadge__static4 = <div> 123 </div>;
const StatusBadge__static5 = <div> 123 </div>;
const StatusBadge__static6 = <div> 123 </div>;
const StatusBadge__static7 = <div> 123 </div>;
it can produce
const StatusBadge__static1 = <><div> 123 </div>
<div> 123 </div>
<div> 123 </div>
<div> 123 </div>
<div> 123 </div>
<div> 123 </div>
<div> 123 </div></>
2. static element inside expression can also be hoisted.
currently the 1st div is hoisted, but the 2nd stays as is in the compiled output
<>
<div> 123 </div>
{<div> 123 </div>}
</>
Reproduction Steps
playground
Environment
Additional Context
No response
Checklist
Issue Category
Other
Bug Description
1. continuous static elements can be hoisted into a single variable
instead of producing a variable per element
it can produce
2. static element inside expression can also be hoisted.
currently the 1st div is hoisted, but the 2nd stays as is in the compiled output
Reproduction Steps
playground
Environment
Additional Context
No response
Checklist