I’d be surprised if it did because I just checked this and it looks like you’re facing this exact problem:
I tested on maOS, the Function zip was about 16 MB. I then tested on an Ubuntu machine, the zip turned out to be 55 MB. I then added:
[functions]
included_files = ["!./node_modules/chart.js/dist/docs/**"]
inside the netlify.toml
and that did bring the size down to 52.4 MB, but that’s still over the limit.
Apparently, platform-specific dependencies are taking up space in this function.
Here’s the screenshot from the Ubuntu VM:
and here’s the screenshot that shows that the docs
directory is missing in the zip:
Note that, I’m not even using the Netlify build image at this point, testing in a vanilla Ubuntu 22.04 installation (with Git and Node installed). Since this is happening outside of Netlify, there’s not a lot we can do about it.