Next.js Discord

Discord Forum

Vercel lambda fonction size

Unanswered
Pampas Deerhound posted this in #help-forum
Open in Discord
Pampas DeerhoundOP
I'm trying to optimize the coldstart of my Vercel lambda functions. I noticed the functions size was about 30MB which seams like a lot to me. Especially considering that the biggest server bundle generated by my Next.js build is 1MB. I know the lambda also includes some node modules. But how can I monitor this to understand what is taking that much space. Also, I'm surprised that most of the Vercel lamba functions end-up having the same 30MB size. I was expecting that the build would generate a lambda per endpoint, so endpoints not importing much should be smaller, no? I have the feeling that I'm missing somthing here but can't find any clear information about this...

3 Replies

Pampas DeerhoundOP
Thanks @riský , I rememberer seeing something like this but couldn't find it again. In vercel dashboard, each endpoint is shown as an individual lambda. But I guess all my functions are actually bundled together. Is there any way to check what's acuatlly happening?
yeah, it took me a few mins to find it (i too remember it), i don't think there is any way... but there might be somewhere