-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lit templating engine #70
Comments
I've made some good progress on this so far, but ran into an issue attempting to render declarative shadow DOM with A workaround of adding Even if this issue gets fixed, it does introduce some non-trivial complexity for I also wonder if the restrictions on |
Rendering |
I upgraded the Lit dependency and rebased the branch to try again. Unfortunately I still get the same error. I filed an issue more directly about this use case to see if we can find a fix and if DSD templates actually need to use static expressions. |
To improve security of the rendered output, we should not be using raw strings. Instead we should be using a real templating system which escapes data and input from the actual structure of the rendered HTML. This isn't a massive concern in a Bazel context for rendering at build time, since Bazel requires builds to be hermetic and checked in source code is usually pretty trusted. However potential supply chain vulnerabilities could leak malicious content into their outputs which get sent to users, so this is still good to do. If we move forward with SSR, this will be even more important.
For now, I'd like to start with
lit-html
as a templating engine because:@rules_prerender
.lit-html
and don't pull inLitElement
.prerender_component()
directly wraps the prerenderts_project()
orjs_library()
, meaning it is very convenient (though not strictly required) to have first-party support for any templating engine with a compile-step.I'm also open to considering a JSX-based templating system since that has direct support in
tsc
. I'm not very familiar with it though, so I think that should come secondary to alit-html
engine.The text was updated successfully, but these errors were encountered: