Created
November 27, 2019 07:55
-
-
Save darrenmothersele/7d7a02ad25c4a3117fb92aa762f8ef3c to your computer and use it in GitHub Desktop.
Server side rendering of web components (ssr, custom elements, shadow dom)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Possible approaches to rendering web components on the server... | |
Server side DOM library (JSDOM alternative) that supports custom elements: | |
https://www.npmjs.com/package/happy-dom | |
https://medium.com/@treshugart/%C3%A5server-side-rendering-web-components-e5df705f3f48 | |
Approach is based on this zip: | |
https://gist.github.com/justinfagnani/936791248120749ff1f8188f1f4064d9 | |
Share a template between client side code and server side code: | |
https://blog.lamplightdev.com/2019/07/20/how-to-server-side-render-web-components/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lit SSR is fairly new: https://lit.dev/docs/ssr/overview/