The Edge Function "map" is 1.13mb which exceeds the maximum size limit of 1mb.
See original GitHub issueWhat version of Next.js are you using?
12.0.7
What version of Node.js are you using?
v14.17.0
What browser are you using?
CLI
What operating system are you using?
macOS
How are you deploying your application?
vercel cli
Describe the Bug
This is an experimental feature in Next.js 12, but once enabled, SSR will use the same Edge Runtime as Middleware.
The Edge Runtime breaks my code, as:
The Edge Function “map” is 1.13mb which exceeds the maximum size limit of 1mb.
Related to https://github.com/vercel/next.js/issues/31317
Expected Behavior
I should be able to enable concurrentFeatures: true
and publish my project to vercel, without triggering the different runtime.
Quite frankly, the 1mb limit is just too small. Using threejs libs, d3 libs, material-ui, and accessibility libs easily pushes me above the limit. Using next/dynamic, adding sideEffects: false, and other techniques have no effect on the size.
I also tried using cdns with nextjs like https://betterprogramming.pub/next-js-reducing-bundle-size-when-using-third-party-libraries-db5407252d59 suggests, but that did not work either.
Even if you do manage to somehow reduce the file size, then you will still run into https://github.com/vercel/vercel/discussions/6931
To Reproduce
N/A
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:8 (4 by maintainers)
Top GitHub Comments
@balazsorban44 here is the link to the issue with the code https://github.com/vercel/next.js/issues/34201
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.