This repository was archived by the owner on Feb 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Documentation for bundle-size-stats #1900
Copy link
Copy link
Open
Description
Do you want to request a feature or report a bug?
This is a documentation request.
What is the current behavior?
- When the build runs, the JSON files in
draft-js/meta/bundle-size-stats/are updated. They are not human readable and it confuses people, and we have not documented how to use them.
Goals:
- MVP would be a couple of steps:
- to somehow make it optional to update these files, so that they don't update every time the build runs. I had thought this would be handy to always have them updated, but since it is confusing people I think we could make it a separate step.
- to add a file inside the
draft-js/meta/bundle-size-stats/that explains that you can drag the JSON file and drop it onto a page like this and see the current state of the bundle, giving the size of every module. We could briefly explain this in theREADMEorCONTRIBUTINGdocuments and link to the full guide.
- Bonus ideas:
- Set up a github bot to comment on pull requests and mention the size increase or decrease they would cause for the bundle.
- Rig up a page in the Draft.js documentation to show the bundle analysis for the latest release.
- Look at the data and find some easy ways to decrease the bundle size. It's too big right now.
For context see the two PRs which introduced the bundle-size-stats tracking:
#1644
and
#1654
Please comment on this issue if you are working on it, and I will check in here roughly weekly to review/answer questions. Thanks! ✨
Tagging @altano who added this cool feature and can maybe give context on this.
niveditc, altano and dwivediabhimanyu