-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove README.md from bundle #2056
Comments
I have wondered about this sometimes, but the size is reasonably small in the overall scheme of things, and caching can eliminate the download entirely as a global approach. And no one has complained recently. :-) npm decided long ago to always include the README, I am guessing so available offline, or so always available on the npm package page (or both). Have you seen other packages that deliberately have a placeholder README for their npm packages? |
Looking for the size alone is small, but this library has so many downloads that even a tiny change can have a huge impact.
Caching helps but doesn't eliminate the bandwidth spent on the user side to download the package.
To be honest, I never saw it, I was just looking for the top download libs on NPM and seeing what I could do to optimize the bandwidth, the easiest approach was to look at the heaviest files, and I think for this library a placeholder could be worthy since the README is really heavy (25% of the lib), but I'm not sure about what should go on the placeholder, I added a proposal on #2058. |
Related discussion about npm treatment of README with some higher level approaches proposed: npm/rfcs#744 |
There wasn't concern expressed by npm folks about README bandwidth in npm/rfcs#744 and the README does get displayed in a number of other contexts. I am subscribed to that issue for updates. There hasn't been further activity in a month. Closing this as resolved. Feel free to open a new issue if it comes up again, with new information and renewed interest. |
By NPM itself is impossible to remove,
pack
command will always include theReadme.md
in the bundle, but maybe we can use another tool to pack or just try to reduce the size of theReadme
by splitting the documentation in another file.This change can save 25% of the bundle size, from 177kb to 134,7kb, saving up to 4,3TB/week of bandwidth.
The text was updated successfully, but these errors were encountered: