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
Bundle size stats #1654
Closed
Closed
Bundle size stats #1654
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This might not have been affecting anything (since `LoaderOptionsPlugin` is only for legacy migration), but we should fix this.
By naming bundle size stats with the bundle name instead of the package version:
- `yarn build` will produce stats for both the development bundle
(Draft.js.json) and the production bundle (Draft.min.js.json) which we can
track separately. The minified bundle is good for understanding what file
size we will be advertising (albeit pre-gzip/brotli).
- The size stats will get overwritten everytime somebody builds and checks in,
but that is desirable. Instead of keeping the entire history of the bundle
size always checked-in (and possibly not in sync with the actual versions),
git will keep track of the bundle size over time. Whenever we release, the
size of the stats file for that release is whatever is in Draft.min.js.json
at the time of release.
Here are the separate bundles visualized at
https://chrisbateman.github.io/webpack-visualizer/:
Development: https://files.terriblefish.com/chrome_2018-02-16_12-11-22.png
Production: https://files.terriblefish.com/chrome_2018-02-16_12-12-01.png
flarnie
approved these changes
Feb 23, 2018
Contributor
flarnie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flarnie is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flarnie has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
alicayan008
pushed a commit
to alicayan008/draft-js
that referenced
this pull request
Jul 4, 2023
Summary:
By naming bundle size stats with the bundle name instead of the package version:
- `yarn build` will produce stats for both the development bundle
(Draft.js.json) and the production bundle (Draft.min.js.json) which we can
track separately. The minified bundle is good for understanding what file
size we will be advertising (albeit pre-gzip/brotli) while the development version
is useful for seeing a 1:1 mapping between changes in code and bundle size.
- The size stats will get overwritten everytime somebody builds and checks in,
but that is desirable. Instead of keeping the entire history of the bundle
size always checked-in (and possibly not in sync with the actual versions),
git will keep track of the bundle size over time. Whenever we release, the
size of the stats file for that release is whatever is in Draft.min.js.json
at the time of release.
Here are the separate bundles (as visualized by
https://chrisbateman.github.io/webpack-visualizer/):
Development: https://files.terriblefish.com/chrome_2018-02-16_12-11-22.png
Production: https://files.terriblefish.com/chrome_2018-02-16_12-12-01.png
`yarn test`, `yarn run lint`, and `yarn run flow` all pass.
Closes facebookarchive/draft-js#1654
Reviewed By: flarnie
Differential Revision: D7073462
Pulled By: flarnie
fbshipit-source-id: 64cbad2dcaf93641ff932a63aaa47e59d86c9df7
aforismesen
added a commit
to aforismesen/draft-js
that referenced
this pull request
Jul 12, 2024
Summary:
By naming bundle size stats with the bundle name instead of the package version:
- `yarn build` will produce stats for both the development bundle
(Draft.js.json) and the production bundle (Draft.min.js.json) which we can
track separately. The minified bundle is good for understanding what file
size we will be advertising (albeit pre-gzip/brotli) while the development version
is useful for seeing a 1:1 mapping between changes in code and bundle size.
- The size stats will get overwritten everytime somebody builds and checks in,
but that is desirable. Instead of keeping the entire history of the bundle
size always checked-in (and possibly not in sync with the actual versions),
git will keep track of the bundle size over time. Whenever we release, the
size of the stats file for that release is whatever is in Draft.min.js.json
at the time of release.
Here are the separate bundles (as visualized by
https://chrisbateman.github.io/webpack-visualizer/):
Development: https://files.terriblefish.com/chrome_2018-02-16_12-11-22.png
Production: https://files.terriblefish.com/chrome_2018-02-16_12-12-01.png
`yarn test`, `yarn run lint`, and `yarn run flow` all pass.
Closes facebookarchive/draft-js#1654
Reviewed By: flarnie
Differential Revision: D7073462
Pulled By: flarnie
fbshipit-source-id: 64cbad2dcaf93641ff932a63aaa47e59d86c9df7
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Summary
Track bundle size stats by file output name
By naming bundle size stats with the bundle name instead of the package version:
yarn buildwill produce stats for both the development bundle(Draft.js.json) and the production bundle (Draft.min.js.json) which we can
track separately. The minified bundle is good for understanding what file
size we will be advertising (albeit pre-gzip/brotli) while the development version
is useful for seeing a 1:1 mapping between changes in code and bundle size.
but that is desirable. Instead of keeping the entire history of the bundle
size always checked-in (and possibly not in sync with the actual versions),
git will keep track of the bundle size over time. Whenever we release, the
size of the stats file for that release is whatever is in Draft.min.js.json
at the time of release.
Here are the separate bundles (as visualized by
https://chrisbateman.github.io/webpack-visualizer/):
Development: https://files.terriblefish.com/chrome_2018-02-16_12-11-22.png
Production: https://files.terriblefish.com/chrome_2018-02-16_12-12-01.png
Test Plan
yarn test,yarn run lint, andyarn run flowall pass.