Skip to content

[docs] showcase example of SSR with VM module #1354

@augustjk

Description

@augustjk

Thanks @KonnorRogers for suggesting!

We can also showcase a running example of SSR with VM module, a la https://stackblitz.com/edit/lit-ssr-vm-module?file=src%2Fserver.js

While making this, I noticed the example in https://lit.dev/docs/ssr/server-usage/#vm-module is different than the example in https://github.com/lit/lit/tree/main/packages/labs/ssr#rendering-in-a-separate-vm-context

They ultimately do the same thing but looks like the lit.dev example was changed in #1026 since renderModule actually creates a module loader with some DOM shim baked into the global which no longer became necessary. (This actually might be some cruft we should address in the SSR package).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions