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
Trying to reduce the slug size, I investigated what ends up as part of the 86MB .heroku/node folder (as reported by du -h -d 1 .heroku in a one-off dyno).
Among this size, we have 6.3MB contributed by .heroku/node/lib/node_modules/npm/docs. Including the npm documentation in the slug looks unnecessary to me, and that represents 7% of the (uncompressed) size contributed by the buildpack.
Note that the man, scripts (containing npm development tooling) and changelogs folders of the npm install could probably also be removed in the cleanup (but they are much smaller).
The text was updated successfully, but these errors were encountered:
Hi @stof, thanks for raising this - we download the node binaries as is, which include npm, and release them to our own S3 buckets. I'm not sure the reasoning for Node having the npm docs there, but it may warrant a discussion/open issue over on Node.
On the flip side, I'd like to remove any unused artifacts that get pulled into slugs regardless, so I'll look at what we can do on the Heroku binaries/buildpack end.
Well, for the docs folder, which seems to be the source of the website, this seems indeed questionable. The fact that we also have the scripts folder containing development tooling makes me wonder whether they ever filtered the content they ship.
The man folder is probably used for npm help (unless they actually duplicate the content), but that's not a command you will run on heroku.
Trying to reduce the slug size, I investigated what ends up as part of the 86MB
.heroku/node
folder (as reported bydu -h -d 1 .heroku
in a one-off dyno).Among this size, we have 6.3MB contributed by
.heroku/node/lib/node_modules/npm/docs
. Including the npm documentation in the slug looks unnecessary to me, and that represents 7% of the (uncompressed) size contributed by the buildpack.Note that the
man
,scripts
(containing npm development tooling) andchangelogs
folders of thenpm
install could probably also be removed in the cleanup (but they are much smaller).The text was updated successfully, but these errors were encountered: