You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that all files in the now Vercel project root (where .vercel and/or now.json are kept) are being sent to the builder for each Serverless Function. It's causing my builds to fail, as my repo as a whole is well over the Lambda max of 50MB, even though each Serverless function is well below that.
My understanding is that each Serverless Function should, by default, include only its own .php file, plus any matching files explicitly specified in that function's includeFiles in now.json.
The example at the repo above is nearly identical to the vercel-examples/php example, just with a 100MB nonsense zip file added to the root directory. It fails to build because Error: The Serverless Function "api/index.php" is 127.22mb which exceeds the maximum size limit of 50mb. Learn More: https://vercel.link/serverless-function-size.
The text was updated successfully, but these errors were encountered:
unitof
changed the title
Entire project is being sent to builder
Entire project is being sent to each builder
Aug 6, 2020
unitof
changed the title
Entire project is being sent to each builder
Entire project is sent to each builder
Aug 6, 2020
Gotcha, my mistake then. I assumed it did some static analysis like some of the other runtimes to determine which files are required. I now see it just includes the whole directory where .vercel resides by default.
I don't want to .vercelignore the files in my root, as I want them to be served statically, but I'll use excludeFiles instead.
Which does lead me to a new bug, which I just reported: Vercel now requires includeFiles and excludeFiles to be a single glob pattern, but vercel-php still expects arrays.
Bug report
0.3.1
Description
It appears that all files in the now Vercel project root (where
.vercel
and/ornow.json
are kept) are being sent to the builder for each Serverless Function. It's causing my builds to fail, as my repo as a whole is well over the Lambda max of 50MB, even though each Serverless function is well below that.My understanding is that each Serverless Function should, by default, include only its own
.php
file, plus any matching files explicitly specified in that function'sincludeFiles
innow.json
.The example at the repo above is nearly identical to the vercel-examples/php example, just with a 100MB nonsense zip file added to the root directory. It fails to build because
Error: The Serverless Function "api/index.php" is 127.22mb which exceeds the maximum size limit of 50mb. Learn More: https://vercel.link/serverless-function-size
.The text was updated successfully, but these errors were encountered: