Skip to content

fix(bundle-check): exclude peer deps from size measurements#3411

Draft
talkor wants to merge 2 commits into
masterfrom
fix/bundle-size-check-exclude-peers
Draft

fix(bundle-check): exclude peer deps from size measurements#3411
talkor wants to merge 2 commits into
masterfrom
fix/bundle-size-check-exclude-peers

Conversation

@talkor

@talkor talkor commented Jun 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Add ignore: ["react", "react-dom"] to all size-limit entries in the generated config
  • These are peerDependencies provided by consumers — they should not count toward component bundle size

Problem

The size-limit check was bundling react and react-dom into 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 React devDependency version (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

  • Verified locally: Toggle goes from 71.8KB → 32.69KB with the fix
  • CI bundle check runs clean

🤖 Generated with Claude Code

talkor added 2 commits June 28, 2026 17:00
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.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Bundle Size Analysis

✅ No bundle size changes detected.

Unchanged Components
Component Base PR Diff
@vibe/button 14.83KB 14.8KB -29B 🟢
@vibe/clickable 3.56KB 3.54KB -17B 🟢
@vibe/dialog 17.54KB 17.53KB -8B 🟢
@vibe/icon-button 31.44KB 31.44KB +5B 🔺
@vibe/icon 10.42KB 10.4KB -22B 🟢
@vibe/layer 412B 412B 0B ➖
@vibe/layout 7.45KB 7.43KB -25B 🟢
@vibe/loader 3.25KB 3.22KB -33B 🟢
@vibe/tooltip 26.65KB 26.65KB 0B ➖
@vibe/typography 28.82KB 28.77KB -52B 🟢
Accordion 3.94KB 3.95KB +7B 🔺
AccordionItem 31.82KB 31.76KB -59B 🟢
AlertBanner 36.26KB 36.22KB -47B 🟢
AlertBannerButton 16.38KB 16.32KB -65B 🟢
AlertBannerLink 12.81KB 12.79KB -20B 🟢
AlertBannerText 29.33KB 29.38KB +44B 🔺
AttentionBox 39.67KB 39.67KB -1B 🟢
Avatar 32.1KB 32.07KB -35B 🟢
AvatarGroup 58.92KB 58.84KB -88B 🟢
Badge 8.53KB 8.48KB -43B 🟢
BreadcrumbItem 30.09KB 30.02KB -67B 🟢
BreadcrumbMenu 34.17KB 34.14KB -23B 🟢
BreadcrumbMenuItem 42.48KB 42.35KB -135B 🟢
BreadcrumbsBar 3.31KB 3.28KB -34B 🟢
ButtonGroup 33.79KB 33.74KB -57B 🟢
Checkbox 32.3KB 32.25KB -51B 🟢
Chips 40.49KB 40.48KB -11B 🟢
ColorPicker 39.87KB 39.86KB -10B 🟢
ColorPickerContent 39.15KB 39.13KB -22B 🟢
Combobox 49.43KB 49.36KB -74B 🟢
Counter 7.56KB 7.59KB +27B 🔺
DatePicker 78.08KB 78KB -80B 🟢
Divider 3.05KB 3.03KB -18B 🟢
Dropdown 60.98KB 60.9KB -77B 🟢
EditableHeading 31.93KB 31.92KB -18B 🟢
EditableText 31.85KB 31.78KB -77B 🟢
EmptyState 35.89KB 35.86KB -23B 🟢
ExpandCollapse 31.57KB 31.52KB -50B 🟢
FormattedNumber 3.42KB 3.4KB -18B 🟢
GridKeyboardNavigationContext 2.2KB 2.19KB -4B 🟢
HiddenText 2.99KB 2.97KB -22B 🟢
Info 37.46KB 37.46KB +2B 🔺
Label 34KB 33.98KB -20B 🟢
Link 12.43KB 12.39KB -34B 🟢
List 38.28KB 38.29KB +16B 🔺
ListItem 30.91KB 30.88KB -32B 🟢
ListItemAvatar 32.27KB 32.25KB -16B 🟢
ListItemIcon 11.52KB 11.53KB +8B 🔺
ListTitle 30.47KB 30.38KB -96B 🟢
Menu 6.3KB 6.28KB -27B 🟢
MenuDivider 3.17KB 3.14KB -27B 🟢
MenuGridItem 4.75KB 4.72KB -29B 🟢
MenuItem 42.35KB 42.27KB -80B 🟢
MenuItemButton 35.35KB 35.39KB +41B 🔺
MenuTitle 30.78KB 30.71KB -67B 🟢
MenuButton 31.71KB 31.7KB -13B 🟢
Modal 44.56KB 44.51KB -47B 🟢
ModalContent 2.15KB 2.15KB 0B ➖
ModalHeader 31.17KB 31.17KB -5B 🟢
ModalMedia 5.14KB 5.12KB -16B 🟢
ModalFooter 33.03KB 32.97KB -62B 🟢
ModalFooterWizard 33.97KB 33.93KB -49B 🟢
ModalBasicLayout 6.54KB 6.59KB +48B 🔺
ModalMediaLayout 5.71KB 5.71KB +1B 🔺
ModalSideBySideLayout 3.94KB 3.92KB -24B 🟢
MultiStepIndicator 18.33KB 18.27KB -66B 🟢
NumberField 38.16KB 38.25KB +96B 🔺
ProgressBar 4.96KB 4.94KB -19B 🟢
RadioButton 31.25KB 31.25KB +1B 🔺
Search 36.01KB 35.94KB -78B 🟢
Skeleton 3.59KB 3.6KB +19B 🔺
Slider 39.25KB 39.3KB +46B 🔺
SplitButton 31.89KB 31.82KB -74B 🟢
SplitButtonMenu 6.43KB 6.42KB -9B 🟢
Steps 36.69KB 36.71KB +22B 🔺
Table 4.92KB 4.89KB -31B 🟢
TableBody 32.13KB 32.14KB +13B 🔺
TableCell 30.58KB 30.55KB -31B 🟢
TableContainer 2.89KB 2.88KB -4B 🟢
TableHeader 3.27KB 3.24KB -33B 🟢
TableHeaderCell 37.51KB 37.52KB +9B 🔺
TableRow 3.15KB 3.13KB -20B 🟢
TableRowMenu 34.47KB 34.39KB -81B 🟢
TableVirtualizedBody 36.81KB 36.84KB +31B 🔺
Tab 29.42KB 29.37KB -53B 🟢
TabList 6.58KB 6.54KB -33B 🟢
TabPanel 2.91KB 2.88KB -26B 🟢
TabPanels 3.48KB 3.47KB -5B 🟢
TabsContext 3KB 2.99KB -14B 🟢
TextArea 31.7KB 31.7KB -1B 🟢
TextField 34.81KB 34.72KB -95B 🟢
TextWithHighlight 29.71KB 29.73KB +20B 🔺
ThemeProvider 2.05KB 2.03KB -17B 🟢
Tipseen 36.47KB 36.53KB +62B 🔺
TipseenContent 37KB 36.89KB -108B 🟢
TipseenMedia 36.7KB 36.66KB -41B 🟢
TipseenWizard 39.2KB 39.17KB -36B 🟢
Toast 39.4KB 39.33KB -67B 🟢
ToastButton 16.16KB 16.14KB -19B 🟢
ToastLink 12.7KB 12.6KB -95B 🟢
Toggle 32.05KB 31.99KB -61B 🟢
TransitionView 3.02KB 3.04KB +20B 🔺
VirtualizedGrid 10.27KB 10.23KB -40B 🟢
VirtualizedList 9.96KB 9.93KB -28B 🟢
List (Next) 5.84KB 5.82KB -17B 🟢
ListItem (Next) 35.23KB 35.25KB +21B 🔺
ListTitle (Next) 30.75KB 30.66KB -92B 🟢

📊 Summary:

  • Total Base Size: 2.46MB
  • Total PR Size: 2.46MB
  • Total Difference: 2.73KB

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.

1 participant