Skip to content
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 #2058

Closed
wants to merge 2 commits into from
Closed

Remove Readme.md from bundle #2058

wants to merge 2 commits into from

Conversation

H4ad
Copy link

@H4ad H4ad commented Nov 1, 2023

Closes #2056

This change can save 25% of the bundle size, from 177kb to 134,8kb (45.8kb to 33.1 gzip), saving up to ~1,3TB/week (108,256,856 * 12.7 kB / 1024/ 1024) of bandwidth.

@H4ad
Copy link
Author

H4ad commented Nov 1, 2023

I think we should not remove it, but instead replace it with a cheaper version, removing it will probably make the page on NPM be empty.

@shadowspawn
Copy link
Collaborator

For interest, a different approach is to use .github/README.md which is preferentially used by GitHub. Nice example project showing it in action: https://www.npmjs.com/package/@usulpro/readme-pro

@H4ad
Copy link
Author

H4ad commented Nov 1, 2023

But this only works if you want to publish using Github, I think.

At least, doing the test locally using npm pack, didn't work.

@shadowspawn
Copy link
Collaborator

I don't want to make changes without a clearer idea of the benefits and downsides. "Saving bandwidth" is not enough of a reason on its own.

Is the npm distribution network asking for bundles to be made smaller? Are Commander users asking for the bundle to be made smaller? Are Commander users asking for the README to be split up or moved to its own website?

I will leave the associated issue open to see if it gets feedback from users (#2056), and the related issue on npm about a higher level solution has got some interesting responses (npm/rfcs#744).

@shadowspawn shadowspawn closed this Nov 4, 2023
@H4ad H4ad deleted the perf/remove-readme-from-bundle branch November 4, 2023 02:33
@H4ad H4ad restored the perf/remove-readme-from-bundle branch November 4, 2023 02:33
@H4ad H4ad deleted the perf/remove-readme-from-bundle branch November 4, 2023 02:33
@H4ad H4ad restored the perf/remove-readme-from-bundle branch November 4, 2023 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove README.md from bundle
2 participants