Stencil: Need SSR (not prerendering)

Created on 9 Jun 2019  路  3Comments  路  Source: ionic-team/stencil

Stencil version:

@stencil/[email protected]

I'm submitting a: feature request

Current behavior:
There is no full support for SSR or at least not provided working example of it.

Expected behavior: working SSR ))

Other information:
We (me and @jagreehal) tried to make ssr example based on his repo stencil-ssr-example, but it proves that there's no SSR support but only prerendering.

Even in your official repo made with Hacker News API ionic-stencil-hn-app - and there only prerendering happens. And if you check the page's source (Ctrl + U) of the deployed app's index page - you can see articles from 2017 year there but not 2019 news.

I'm so exicted of your Stencil compiler framework but cannot use it on my project cause there is no support for SSR (or I don't know about it and many people doesn't know).
You don't have any info in the docs about SSR (only prerendering).

So my feature request is: let's make SSR happen as fast as we can!

  • add chapter to the docs about SSR.
  • make stencil-ssr-app repo as example
triage

Most helpful comment

Same here @bekliev . In v0.17.0 was possible import @stencil/core/server, but it seems it is deleted or moved to another path in this version. And documentation don't provide or mention something about SSR 馃槙 .

All 3 comments

Same here @bekliev . In v0.17.0 was possible import @stencil/core/server, but it seems it is deleted or moved to another path in this version. And documentation don't provide or mention something about SSR 馃槙 .

Any update? Would like to use this. When Stencil won't support this in the future we need to choose another SSR solution.

SSR can be accomplished using the dist-hydrate-script output target. It'll create a new script which can be ran from express:
https://stenciljs.com/docs/hydrate-app

Was this page helpful?
0 / 5 - 0 ratings