I’m using Vercel to deploy a simple website with gallery.tsx
and gallery/[slug].tsx that display all the images in a certain folder using fs
. I do not have any APIs, so I don’t know why anything would count as a serverless function. I used create-next-app to make the website.
Warning: Max serverless function size of 250 MB uncompressed reached
Serverless Function's page: gallery.js
Large Dependencies Uncompressed size
public/images/recent 416.12 MB
All dependencies 461.18 MB
Serverless Function's page: gallery/[slug].js
Large Dependencies Uncompressed size
public/images/recent 416.12 MB
I think what is happening is that the images in the public folder are being considered serverless functions and taking up a bunch of space, which exceeds the limit for the hobby plan in Vercel.
2