eManPrague / frui.ts

Pragmatic MVVM frontend framework
MIT License
14 stars 5 forks source link

SSR #58

Open gius opened 2 years ago

gius commented 2 years ago

Investigate server-side rendering possibilities for Frui.ts applications.

https://github.com/brillout/vite-plugin-ssr https://github.com/frandiox/vite-ssr#readme

brancooo1 commented 2 years ago

I've tried react-snap and prerender-spa-plugin, both based on puppeteer.

The latter seemed quite handy (webpack-only configurable) and did run locally quite well. Unfortunately I didn't make it to production because of time press, also running it in docker in production pipeline can be a bit of challenge..

gius commented 1 year ago

As Frui.ts v1 no longer uses its own router, implementing SSR should be much easier now. However, it will be more framework (Next/Remix) specific, because of the router actually used. Implementing a useViewModel hook that will just handle a viewModel lifecycle should help here.