Skip to content

[lit-html] Precompiling Templates #189

@jridgewell

Description

@jridgewell

Related to #187, I'm opening this so we can discuss how to precompile templates.

The general idea is how do we take creating a Template instance out of the first-render load time. Ie, make this new disappear, taking all of this (163 lines of very slow code!) out of the first render.

I think we can manage to precompile these in a build step, making a file instantiate Templates with the correct TemplateStringsArray and already instantiated TemplateParts (with the correct indexes). We might need to expose the templateCache externally.

Metadata

Metadata

Labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions