Open resdevd opened 4 years ago
Hey @resdevd, I have a prototype version where all the static files are indeed in Cloudflare KV, which allows you to do some really interesting things.
But @geelen is about to release V1.0 of the FAB spec, so will wait until after that release so we release them at the same time. Shouldn't be too long now :)
Thank you. It's a great news that Fab v1 is coming soon. I just wanted to expand the context. So the static export from nextjs is not an issue, as using wrangler and .toml file we can push to static assets into KV. The gap is the serverless ssr build that seems tricky to integrate into Cloudflare KV. Following are some discussions regarding nextjs serverless ssr build deployment to cloudflare worker sites with KV.
https://github.com/zeit/next.js/issues/6282 https://hyperion.alpha.spectrum.chat/next-js/general/best-strategy-for-caching-ssr-pages~92d169ae-d664-4ebf-b305-8928370ec358 https://stackoverflow.com/questions/59133318/next-js-serverless-rendering-with-clouflare-workers
Hopefully @signalnerve has some input on nextjs serverless ssr and cloudflare worker integration.
Either way, I'll be looking forward for fab v1 release.
Ah yeah, no I got what you were trying to get to. And that is what we will support. A NextJS SSR app, where the client-side assets are stored in (and served from) KV.
Thank you for prompt reply. Can't wait for move all my projects to fab spec.
👀 👀 👀 👀
i don't have a ton of thoughts here besides that i'm excited about this and a lot of people ask about it :) generally i've been pointing people to fab! i haven't had the time to prioritize digging into it for a few months now. also cc @lolcoolkat who has been exploring this as well
Oh yes this is extremely coming. I've been struggling a bit with my plugin architecture last week or so but I think I've cracked it now. Porting NextJS SSR support is the next thing on my list (it already works in FAB v0), KV support is proven in @evanderkoogh's POC, needs porting as well.
But yes, you will be able to take a NextJS app, throw a couple-line server in front of it if you need to do anything fancy, and serve it on CF workers & KV in no time. Oh and then use your free Linc account for per-commit previews & auto-deploys 🥰
Sorry for the lack of visible progress recently I lost a bunch of time to Rollup vs Webpack which is as fun as watching paint dry but then you're the paint and it's everywhere and you can't get out, lol.
and... any updates? so far it's pretty easy to bump into worker size limit
UPD I see it actually does deploy static assets to KV, must be some other issue, sorry. Maybe close this issue then?
With recent release of Cloudflare KV, is it possible to use them as fab.zip target instead of s3? Currently nextjs Serverless build only seems to officially support lambda or now. This is would be a game changer.
Thank you for this great package. @geelen