Update: I'm currently developing a Nuxt module to integrate with stencil.js based libraries.
https://github.com/Gomah/nuxt-stencil
What it does:
It creates two hooks for SSR based applications (universal or build-time) using the render:route
& generate:page
, it will render the stencil components before sending back the request to the browser.
It injects a plugin for CSR to define the custom elements from your stencil library, as described here.
⚠️ Note: Vue’s throwing few errors when hydrating on CSR, it's probably due to the comments that the renderer inject when rendering stencil components
Outdated comment, before Stencil V1:
It looks like Stencil v1 might resolve SSR, according to this comment:
Stencil One will use the dist-hydrate-script output target to generate
a node script that can be used to hydrate your scripts. Then the
generated dist/hydrate/index.js script is something you can reuse in
numerous locations (Angular Universal, Express Middleware, custom
prerendering, etc).
If you're prerendering, you'll be able to just add the --prerender
flag to your stencil build, and it'll handle all of this for you.
We're still actively working on this and hope to ship it soon. Thanks
Github related issues:
https://github.com/ionic-team/stencil/issues/1036
https://github.com/ionic-team/stencil/issues/1449