preactjs / preact-www

:book: Preact documentation website.
https://preactjs.com
MIT License
358 stars 500 forks source link

refactor: Drop `netlify-lambda`, use Vite middleware for Netlify functions #1108

Closed rschristian closed 6 months ago

rschristian commented 6 months ago

Middleware impl mostly from @marvinhagemeister in https://github.com/preactjs/preact-www/commit/d2948f046085eff081497208b37093a110d30b0f

This also swaps out superstatic for vite preview for local testing of the prod build. Drops a unnecessary dependency, but no functional change.

I will have to alter the functions directory on Netlify, as we're no longer building them into dist/ (as we don't need to -- Netlify should natively support everything we're using now), so they won't work in the preview. I'll need to set that right before merging.