Fix /api/assetImage for real :p

This commit is contained in:
Emi Matchu 2021-11-02 01:21:32 -07:00
parent 36c32cdd70
commit f45ae20471
3 changed files with 13 additions and 1 deletions

12
api/README Normal file
View file

@ -0,0 +1,12 @@
This is a hack to work around a limitation deploying to Vercel!
https://github.com/vercel/vercel/issues/4739#issuecomment-926879578
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.
If we move off Vercel, it'll be a good idea to move these endpoints back into
the /pages/api folder!

View file

@ -9,7 +9,7 @@
} }
], ],
"functions": { "functions": {
"pages/api/assetImage.js": { "api/assetImage.js": {
"excludeFiles": "node_modules/playwright/**" "excludeFiles": "node_modules/playwright/**"
} }
} }