Open MartinKavik opened 4 years ago
@MartinKavik just a quick response here. Given how SSR typically works, I'm thinking that it would be best to ship this functionality as part of the trunk library being designed over in #9. We could add feature switches for the major web server frameworks (tide, warp, actix-web &c), and then folks could just use the trunk::ssr
(server-side rendering) middleware to render their app for the HTTP response. The framework used on the frontend wouldn't make a difference.
Thoughts?
I'm not sure if it's directly related to SSR or webserver frameworks. I just want to start Trunk's dev server and generate HTML files automatically through a browser.
In the Seed quickstart, it's the command build:prerender
: https://github.com/seed-rs/seed-quickstart-webpack/blob/master/package.json#L12. It's basically a very special case of build:release
.
However I understand it may not have to be included in the Trunk core. I've just created thit issue because it will be a show-stopper for moving seed-rs.org
and other projects to Trunk.
It is a comment for information. Is there a desing for this proposal.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Prerendering is important for SEO & SMO, website performance and it allows to use Rust frameworks as static site generators.
Seed templates use react-snap as a non-Rust prerendering tool.
I think we can assume that
wasm-bindgen
automatically downloads needed webdrivers and there is a browser already installed on the target platform to make testing possible.So we should be able to implement prerendering using one of these crates: