Skip to content

Import MUI and lodash by subpath, not their barrels - #323

Merged
smarcet merged 1 commit into
v4.xfrom
perf/subpath-imports
Aug 24, 2026
Merged

Import MUI and lodash by subpath, not their barrels#323
smarcet merged 1 commit into
v4.xfrom
perf/subpath-imports

Conversation

@gcutrini

@gcutrini gcutrini commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

ref: https://app.clickup.com/t/86bbk4x0m

Two consumer-bundle-size fixes, same pattern — import a subpath instead of a library's root barrel, so anything that bundles uicore pulls only what's used:

  • company-input-v2: TextField/Autocomplete/Typography from their @mui/material/* subpaths instead of the @mui/material barrel (which pulls the whole component library).
  • query-actions: debounce from lodash/debounce instead of whole lodash (it uses only debounce).

Behaviour is identical — the barrels re-export these exact modules; only the import paths change.

Two consumer-bundle-size fixes, same pattern — import a subpath instead of a library's root barrel, so anything that bundles uicore pulls only what's used:

- company-input-v2: TextField/Autocomplete/Typography from their @mui/material/* subpaths instead of the @mui/material barrel (which pulls the whole component library).
- query-actions: debounce from lodash/debounce instead of whole lodash (it uses only debounce).

Behaviour is identical — the barrels re-export these exact modules; only the import paths change.
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 63c8059c-b445-41d4-bc93-1dfbb92bcaa8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@santipalenque santipalenque left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smarcet smarcet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smarcet
smarcet merged commit 8a7a4ef into v4.x Aug 24, 2026
5 checks passed
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.

3 participants