Skip to content

[scheduler] Track bundle size of scheduler packages#22682

Open
flaviendelangle wants to merge 1 commit into
mui:masterfrom
flaviendelangle:feat/bundle-size-scheduler
Open

[scheduler] Track bundle size of scheduler packages#22682
flaviendelangle wants to merge 1 commit into
mui:masterfrom
flaviendelangle:feat/bundle-size-scheduler

Conversation

@flaviendelangle

@flaviendelangle flaviendelangle commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

The bundle size CI step (code-infra/upload-size-snapshot in .circleci/config.yml) was already running, but the entrypoint list in test/bundle-size/bundle-size-checker.config.mjs did not include any scheduler entrypoints. As a result, the bundle size of @mui/x-scheduler and @mui/x-scheduler-premium was never measured or reported in the size-snapshot comment.

This PR enables bundle-size tracking for both scheduler packages, the same way it works for the data grid, charts, pickers and tree view.

Changes

Expose the package root (.) export

@mui/x-scheduler and @mui/x-scheduler-premium only declared kebab-case sub-path exports (./event-calendar, ./week-view, …) and no root . entry, so there was no package-level entrypoint to measure like the other packages have.

  • Added ".": "./src/index.ts" to the exports of both packages.
  • The build already auto-generated a root entry from src/index.ts (code-infra adds . whenever build/index.js exists), so this mainly makes the root an explicit, declared public entrypoint (and updates the src/index.ts header comment accordingly).

Add the scheduler packages to the bundle-size config

  • The package roots (@mui/x-scheduler, @mui/x-scheduler-premium) are added explicitly, mirroring how the other packages list their root.
  • The per-component entrypoints are discovered automatically from each package's exports field via a new findComponentsFromExports helper, rather than being hardcoded.
    • The existing findComponents helper scans the build output for PascalCase component folders (e.g. BarChart/index.js). The scheduler uses kebab-case sub-path exports (event-calendar, day-view, …), so findComponents cannot pick them up.
    • findComponentsFromExports reads the exports keys and filters out non-renderable sub-paths (models, locales, theme-augmentation, internals, and use-* hooks). New views are therefore tracked automatically without editing this config.

Resulting scheduler entrypoints (2 roots + 12 components):

@mui/x-scheduler
@mui/x-scheduler/{agenda,day,month,week}-view
@mui/x-scheduler/event-calendar
@mui/x-scheduler/standalone-event
@mui/x-scheduler-premium
@mui/x-scheduler-premium/{agenda,day,month,week}-view-premium
@mui/x-scheduler-premium/event-calendar-premium
@mui/x-scheduler-premium/event-timeline-premium

The internal packages (@mui/x-scheduler-internals, @mui/x-scheduler-internals-premium) are intentionally excluded, consistent with how other *-internals packages (e.g. @mui/x-internals) are not measured.

Testing

  • eslint + prettier --check pass on the changed files.
  • tsc --noEmit passes for both @mui/x-scheduler and @mui/x-scheduler-premium after adding the root export.
  • The config evaluates and produces the expected entrypoints.

🤖 Generated with Claude Code

@code-infra-dashboard

code-infra-dashboard Bot commented Jun 4, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-22682--material-ui-x.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-scheduler 🔺+344KB(new) 🔺+93.3KB(new)
@mui/x-scheduler-premium 🔺+467KB(new) 🔺+129KB(new)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

The bundle size CI step (`upload-size-snapshot`) was running but did not
include any scheduler entrypoints, so `@mui/x-scheduler` and
`@mui/x-scheduler-premium` were never measured.

- Expose the package root (`.`) export for both packages so they can be
  tracked like the other public packages (data grid, charts, pickers,
  tree view). The build already auto-generated a root entry from
  `src/index.ts`; this makes it an explicit, declared public entrypoint.
- Add the scheduler packages to the bundle-size-checker config. Component
  entrypoints are discovered from each package's `exports` field via
  `findComponentsFromExports` (the existing `findComponents` helper only
  matches PascalCase build folders and so can't pick up the scheduler's
  kebab-case sub-path exports), so new views are tracked automatically.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@flaviendelangle flaviendelangle force-pushed the feat/bundle-size-scheduler branch from 4ca4b87 to 6c76072 Compare June 4, 2026 06:16
@flaviendelangle flaviendelangle added type: new feature Expand the scope of the product to solve a new problem. scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). scope: scheduler Changes related to the scheduler. labels Jun 4, 2026
@flaviendelangle flaviendelangle self-assigned this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). scope: scheduler Changes related to the scheduler. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant