-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Make Material-UI a peer dependency? #472
Comments
Of course i can. Just one thing. It makes development harder, reason of npm install --no-save @mate... everytime dependencies updated. But i will do. I can change demo/test page as a another module by using lerna. |
@mbrn I'm not 💯 sure it's the right approach either. A few points to take into account:
|
Might be a good idea to specify the peer version of react as well. |
Strongly in favour of this, will save ~300KB by not bundling material-ui twice. |
@Foosballfan You should be able to avoud this by resolving duplicate entries of Bundling |
@eps1lon So you mean remove this entry within material-table dependencies from the package-lock.json manually?
|
Only if they don't match i.e. if tables requires 3.x then you should also use 3.x. I can't give any guarantees that 3.x and 4.x in the same bundle works. |
Ok great, I made sure they matched exactly in the hope that webpack would treeshake better so no problem there. Feels like a dodgy fix to edit an auto generated file! Thanks for the tip |
Well flattening trees is pretty hard so yarn will occasionally miss some optimizations. |
FYI -- someone encountering issues likely due to this (though they didn't provide a full reproduction of the problem so I can't be certain this is the cause): |
FYI -- another user encountering issues related to this: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required. |
@oliviertassinari Any update on this ? Im currently working with multiple microprojects and was looking into a way to use material ui without bundling it in each project, My initial approach was to use the cdn version of material ui but if its possible to use peer dep that would be much better I'd say. Thank you. |
@WalidKurchied I don't have any specific update on this problem. The Material-UI team has its effort on the grid under https://github.com/mui-org/material-ui-x. We are working on an MIT and advanced enterprise data grid there. |
@oliviertassinari Thank you for letting me know. |
What do you think of making Material-UI a peer dependency? You probably don't want people to bundle the library twice. It's what notistack and material-ui-pickers are doing.
The text was updated successfully, but these errors were encountered: