Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is their a reason @mui/x-date-pickers is in my bundle when I don't have it enabled or imported? #1328

Open
1 task done
MylesWardell opened this issue Dec 16, 2024 · 6 comments

Comments

@MylesWardell
Copy link

material-react-table version

3.0.1

react & react-dom versions

19.0.0

Describe the bug and the steps to reproduce it

I am using vite with the rollup-plugin-visualizer. Just curious if this is intended or if I have misconfigured the table?

Minimal, Reproducible Example - (Optional, but Recommended)

  1. Install and use material react table with a bundle analyzer
  2. See that @mui/x-date-pickers and its full bundle is included

Screenshots or Videos (Optional)

image

Do you intend to try to help solve this bug with your own PR?

None

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
@KevinVandy
Copy link
Owner

MRT imports it

@MylesWardell
Copy link
Author

@KevinVandy maybe a feature request then? Why is this in the bundle? Can it be injected instead?

@KevinVandy
Copy link
Owner

Maybe in the future

@MylesWardell
Copy link
Author

Experimenting with config options on my own rollup but their potentially is a import leak here

node_modules\material-react-table\dist\index.d.ts
image

I cant see any other reason for the whole package to be imported

@KevinVandy
Copy link
Owner

Your prod bundle should only be importing the actual components used by MRT, not the entire library. Are you saying that's what's happening?

@MylesWardell
Copy link
Author

Yes that's what's happening. Sounds like it might be an issue that only I am facing? I'll pull up a separate repo end experiment when I get back from holiday

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

No branches or pull requests

2 participants