fix(bundle-check): exclude peer deps from size measurements#3411
Draft
talkor wants to merge 2 commits into
Draft
fix(bundle-check): exclude peer deps from size measurements#3411talkor wants to merge 2 commits into
talkor wants to merge 2 commits into
Conversation
size-limit was bundling react and react-dom into every component measurement because the generated config had no `ignore` field. These are peerDependencies that consumers provide — they should not count toward component bundle size. This was a pre-existing bug that went unnoticed because both base and PR always had the same React version installed. Any PR that changes the React devDependency version would show a false +3.5KB delta on every component.
Contributor
|
📦 Bundle Size Analysis ✅ No bundle size changes detected. Unchanged Components
📊 Summary:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
ignore: ["react", "react-dom"]to all size-limit entries in the generated configProblem
The size-limit check was bundling
reactandreact-dominto every component measurement. This was a latent bug that went unnoticed because both base and PR branches always resolved the same React version. Any PR that changes the ReactdevDependencyversion (e.g., upgrading from 16 to 18) would show a false +3.5KB on every single component.Impact
Reported sizes drop from ~70KB to ~33KB per component (the ~39KB of react/react-dom is correctly excluded). Relative comparisons between PRs become accurate regardless of dev dependency changes.
Test plan
🤖 Generated with Claude Code