Skip to content

Merge adjacent sibling templates in a fragment into one template #3055

Description

@ryansolid

Moved from ryansolid/dom-expressions#458.

A fragment of adjacent static siblings compiles to one template() per root:

<>
  <div />
  <button type="button">hi</button>
</>
var _tmpl$ = _$template(`<div>`),
  _tmpl$2 = _$template(`<button type=button>hi`);

Those could be a single template string (and one clone) when nothing dynamic sits between them. Reported by @milomg; playground: https://playground.solidjs.com/anonymous/6f9638af-453b-4841-b8cd-76ea1c4fc15a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions