Getting an error that lambda function size exceeds 5mb limit.November 18, 2018 at 1:37am
This is the error I'm getting, and it says you can increase the
maxLambdaSize, however according to your docs (below) this is not possible.
I literally just have one
index.jsx file, and a Graphql query in my
src and thats it right now. What do I do? Thanks.
November 18, 2018 at 1:39am
There's no reason it should be 2mb for a "Hello World", and we are working on addressing that.
(not sure if you're using next in this case, but wanted to mention that)
and you can use a string like "5mb"
@gary-jennings pretty much. In general, the argument is a bit more nuanced, and we're writing a bit more on Monday to illustrate this
If you're doing API work or server-rendering for example, it'd be pretty strange to have more than 5 megabytes of compressed and minified code per entrypoint
For one, with technologies like Next.js and Nuxt and many others, pages are universal
Therefore, the client has all the code and information necessary to render each page
Would you argue for shipping more than 5mb of minified + gzipped code to a browser to render a page?
/node, we are aiming to target the "route-based" or "entrypoint-based" code execution usecase
(to be announced on Monday as well)
This is all improving a lot by the way based on the excellent feedback from the community here
But this is the beauty of serverless too IMO
It's a forcing function (pun somewhat intended) that is making everyone's code better, including ours
Check this out:
I deployed `apollo`, `express`, `graphql` and everything it comes with. Sure, it's a "hello world", but even that
▲ apollo/ (add-apollo) now -f> Deploying ~/Projects/now-examples/apollo under now-examples> https://apollo-4f726vwx0.now.sh [v2] [in clipboard] [3s]┌ index.js Ready [32s]└── λ index.js (947.35KB) [sfo1]> Success! Deployment ready [38s]