2021-11-02 01:40:20 -07:00
|
|
|
This is a hack to work around limitations deploying to Vercel!
|
2021-11-02 01:21:32 -07:00
|
|
|
|
2021-11-02 01:40:20 -07:00
|
|
|
- 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_
|
2021-11-02 01:21:32 -07:00
|
|
|
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
|
2021-11-02 01:40:20 -07:00
|
|
|
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.
|
2021-11-02 01:21:32 -07:00
|
|
|
|
|
|
|
If we move off Vercel, it'll be a good idea to move these endpoints back into
|
|
|
|
the /pages/api folder!
|