News for hackers. Stuff that matters.
Re:Comparing the New Generation of Build Tools by cetra3 on Wednesday April 21, 2021 @09:51PM (#26897810)
I've been using vite for building a new web app and have enjoyed the experience so far.

One thing I'd love to be able to do is to do the classic thing of rendering things mostly as html templates on server side, but serving up JS for particular page components. I also don't want to use node for SSR if at all possible, but seems to be the only route available.

That way I can easily support non-js users of the app (bing struggles to index my site at all). It used to be a lot easier to do this, but I guess it's out of vogue now!

Re:Comparing the New Generation of Build Tools by jasonkester on Thursday April 22, 2021 @07:01AM (#26901323)
Yeah, I've had to deal with this at every js shop I work with recently, so I built this to solve the problem:

https://webrender.io/

Essentially, it's a reverse proxy that serves a cached, pre-rendered HTML version of your site to bot traffic while sending real users onward to your actual website. It works kind of like Cloudflare (which it's built on top of).

You can also hit it with an API from your end if you want to just forward bots or aren't comfortable sticking somebody else's service in front of your site.

Re:Comparing the New Generation of Build Tools by probst on Thursday April 22, 2021 @02:26AM (#26899422)
I have exactly the same need (and problem too)! I'll monitor this thread and see if anyone else has any solutions to this.

I really would like not to have node running on my server in order to get SSR! Which effectively means I'll either have to serve entirely static pages and then hydrate them based on some model client side (which isn't server side rendering by any definition of the term), or I have to recreate the entirety of the HTML rendering functionality for my server side in my language of choice. I guess there might not be a way around the second option?

Re:Comparing the New Generation of Build Tools by kiejo on Monday April 26, 2021 @02:49AM (#26939950)
It sounds like https://astro.build might be a good fit if you're looking to generate mostly HTML and only use JS for a few interactive components on the page. It's still very new and I haven't worked with it yet.