Conversation
|
A live preview of this PR will be available at the URL below and will update on each commit. = https://pr1422---site-khswqo4xea-wl.a.run.app/
|
| // Excludes the given tag names from being handled by the given renderer. | ||
| // Returns a subclass of the renderer that returns `false` for matches() | ||
| // for any element in the list of tag names. | ||
| const excludeElements = ( |
There was a problem hiding this comment.
cc @kevinpschaaf @augustjk we might want this utility in lit-ssr
| }, | ||
| "dependencies": { | ||
| "@lit-labs/task": "^2.0.0", | ||
| "@material/web": "^1.0.0-pre.1", |
There was a problem hiding this comment.
I think we need = here, because we could get a breaking change at any time while we're on pre, right?
| tagName: string, | ||
| attributes: Map<string, string> | ||
| ) { | ||
| console.log('matchesClass', tagName, !excludedTagNames.includes(tagName)); |
| // Excludes the given tag names from being handled by the given renderer. | ||
| // Returns a subclass of the renderer that returns `false` for matches() | ||
| // for any element in the list of tag names. | ||
| const excludeElements = ( |
There was a problem hiding this comment.
Could we move this SSR utility stuff to another module?
| const result = await response.text(); | ||
|
|
||
| // If the page SSR's, we'll have declarative shadow roots in it. | ||
| assert.match(result, '<template shadowroot="open">'); |
There was a problem hiding this comment.
Can we do more in the test? Like test some functionality?
This does the minimum I can see to get MWC components working in Lit SSR:
globalThiswith dummy classes that MWC uses in decorator metadata