Skip to content

Support CSS Module scripts in Lit SSR renderer pluginΒ #1633

@thescientist13

Description

@thescientist13

Motivation

In a recent release, Lit's SSR DOM Shim added support for CSS Module Scripts! πŸŽ‰
https://github.com/lit/lit/blob/main/packages/labs/ssr-dom-shim/CHANGELOG.md#150

We should make sure this works seamlessly with Greenwood and also remove this from the caveats section of the README
https://github.com/ProjectEvergreen/greenwood/blob/master/packages/plugin-renderer-lit/README.md#caveats

Technical Design

I am hoping we can just inline this support into the execute module script of the plugin, so user's don't have to manually instrument the loader hook themselves

Note: testing this will be / is blocked on #1463


On a related, can Greenwood can just "inline" its own loader hook too - https://github.com/lit/lit/blob/main/packages/labs/ssr-dom-shim/src/register-css-hook.ts !? 🫨

Additional Context

Some additional things to check in on while we're here (may need their own issues)

Metadata

Metadata

Labels

Projects

Status

πŸ”– Ready

Relationships

None yet

Development

No branches or pull requests

Issue actions