preactjs / preact-cli

😺 Your next Preact PWA starts in 30 seconds.
MIT License
4.68k stars 377 forks source link

On Demand Pre-Render #1456

Open Debdut opened 3 years ago

Debdut commented 3 years ago

Do you want to request a feature or report a bug?

Feature On Demand Pre-Render

What is the current behaviour? I can pre-render only while building using

preact build --prerenderUrls ./prerender.js

After the build is created, I am not able to pre-render without deleting previous build.

I am building an E-commerce site, when new products are added, I want to pre-render them and only those product pages, keeping rest of my previous build. Is it possible to create a system, when new pages are pre-rendered on demand?

Debdut commented 3 years ago

I don't want SSR for sure!

prateekbh commented 3 years ago

This is a very interesting idea. @developit we should probably do this

prateekbh commented 3 years ago

@Debdut curious about your use case, where and when would you like to trigger this additional prerendering?

Debdut commented 3 years ago

I trigger this when a request comes in

Debdut commented 3 years ago

If you create partial builds which can attach to previous build without deleting it, it works too

ForsakenHarmony commented 3 years ago

I trigger this when a request comes in

So basically cached SSR?

Debdut commented 3 years ago

Yeah, thanks for the terminology

prateekbh commented 3 years ago

I wonder what would the setup look like?

or

Debdut commented 3 years ago

First one sounds better