taverasmisael / taverasmisael.com

My personal website and blog. Build with an hybrid Astro SSR, SolidJS and TailwindCSS. Support for internazionalization and more.
https://taverasmisael.com
2 stars 0 forks source link

prerender post open graph images #1

Closed taverasmisael closed 1 year ago

netlify[bot] commented 1 year ago

Deploy Preview for transcendent-jalebi-325545 failed.

Name Link
Latest commit 32c653222eb02f506ba5eba0c86884ba834d81f9
Latest deploy log https://app.netlify.com/sites/transcendent-jalebi-325545/deploys/6472102236e904000843a9e1
taverasmisael commented 1 year ago

It was not possible to make Netlify's functions work. It seems related to esbuild not supporting top-level awaits and "astro:assets", outputting a top-level await to get some images. This is technically not wrong because the files are .mjs, but esbuild and Netlify don't support that feature yet.

As this is an issue with Astro's experimental assets feature and the code is autogenerated, there's no much to do.

There's the not-at-all-good alternative to stop using the assets experimental and use @astro/images, but that's also experimental and doesn't have the optimizations the assets' integration has. I'll have to update all the references to images in all the posts, which is also not ideal because hopefully in the future, the assets' integration will replace the images anyway.

I'm trying with Vercel now; if not, I'll use the node adapter and move this to a service like fly.io or something.

More context