impress-2020/api/README
Matchu 7205455ccb Fix /api/outfitImage for Vercel
Sigh, okay, serverless functions limiting us again :p

Still, though, we are *much closer* to portability than our original CRA+Vercel stuff though!!
2021-11-02 01:40:20 -07:00

15 lines
709 B
Text

This is a hack to work around limitations deploying to Vercel!
- https://github.com/vercel/vercel/issues/4739#issuecomment-926879578
- https://github.com/vercel/vercel/issues/3460
API endpoints declared in here _won't_ work during local development, but _will_
work when deployed to production.
Putting the endpoint here code-splits it separately from the rest of the app
bundle, so its large dependencies aren't grouped in with the others, and thereby
it just barely stays within the dependency bundle size of 50MB. It also enables
the dependencies in our `vercel-build` step to deploy with the bundle.
If we move off Vercel, it'll be a good idea to move these endpoints back into
the /pages/api folder!