UNPKG

lit-ssr-utils

Version:

Lit utils to implement SSR to projects that do not use Javascript.

2 lines (1 loc) 475 B
import{render as C} from"@lit-labs/ssr";import{collectResultSync as D} from"@lit-labs/ssr/lib/render-result.js";import{unsafeHTML as E} from"lit/directives/unsafe-html.js";import F from"./validate.js";import G from"../module/loadModule.js";import{html as I} from"lit";async function J(k){const q=F(k);if(q)return q;const w=[];for(let x of k.dependencies){const B=G(x.code,x.ext);w.push(B)}await Promise.all(w);const z=I`${E(k.html)}`,A=C(z);return D(A)}export{J as default};