Hi there,
I’ve stepped upon this article from Every Layout:
[…] it is possible to use a library like JSDOM or headless Chrome to run the code and embedded the necessary (initial) styles on the server
[…] With the static site generator, Eleventy, I was able to server-side render initial styles using JSDOM and a post-processing “transform” function.
The same technique (still with 11ty), is also illustrated here:
- Server Side Rendering | Duet Design System
- GitHub - jagreehal/11ty-stenciljs-ssr-example: Example of using server rendered Stencil components in 11ty
Any idea if that would be possible with Hugo?
A kind of “post-process” that would prerender custom elements styles during the builld?