Skip to content

Conversation

@braianj
Copy link
Collaborator

@braianj braianj commented Jan 22, 2026

  • Add to package.json
  • Replace with explicit named exports
  • Keep namespace export for backward compatibility

This allows bundlers to eliminate unused MUI code from dApps, resulting
in smaller bundle sizes. Note: muiIcons has limited tree-shaking due to
namespace export; for better optimization, dApps should import icons
directly from '@mui/icons-material'.

- Add  to package.json
- Replace  with explicit named exports
- Keep  namespace export for backward compatibility

This allows bundlers to eliminate unused MUI code from dApps, resulting
in smaller bundle sizes. Note: muiIcons has limited tree-shaking due to
namespace export; for better optimization, dApps should import icons
directly from '@mui/icons-material'.
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 22, 2026

Deploying ui2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 192ba43
Status: ✅  Deploy successful!
Preview URL: https://4744e000.ui2-423.pages.dev
Branch Preview URL: https://chore-optimize-tree-shaking.ui2-423.pages.dev

View logs

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.

2 participants