popeindustries / lit-html-server

Render lit-html templates on the server as Node.js streams
MIT License
265 stars 12 forks source link

Incompatible handling of strings #125

Closed tstewart-klaudhaus closed 4 years ago

tstewart-klaudhaus commented 4 years ago

In lit-html the parameter to render can be a string. This is not the case in lit-html-server.

To reproduce:

import { renderToString } from "@popeindustries/lit-html-server"
const result = await renderToString("test string")

Expected result to be equal to "test string".

Actual result is an error:

Error: unknown chunk type: test string

popeindustries commented 4 years ago

Yes, this was a feature recently added to lit-html. Should be relatively easy to add here. I'll see what I can do

popeindustries commented 4 years ago

https://github.com/popeindustries/lit-html-server/releases/tag/3.1.0

tstewart-klaudhaus commented 4 years ago

Thank you, works well.