App files seems to be added to api routes when using edge functions
Unanswered
Barbary Lion posted this in #help-forum
Barbary LionOP
The error message after deploy in Vercel:
Error: The Edge Function "api/chat" size is 2.66 MB and your plan size limit is 1 MB. Learn More: https://vercel.link/edge-function-size
I found that after the api/chat file was set to edge runtime, an error would be given after deploying to Vercel, and the files and libraries under the app were packed in.
The analyzing the bundle size as shown in the image below:
I would like to ask whether it is a bug? Is there a way to reduce the size of this api route bundle size?
Related issues: https://github.com/vercel/next.js/issues/45607
Error: The Edge Function "api/chat" size is 2.66 MB and your plan size limit is 1 MB. Learn More: https://vercel.link/edge-function-size
I found that after the api/chat file was set to edge runtime, an error would be given after deploying to Vercel, and the files and libraries under the app were packed in.
The analyzing the bundle size as shown in the image below:
I would like to ask whether it is a bug? Is there a way to reduce the size of this api route bundle size?
Related issues: https://github.com/vercel/next.js/issues/45607