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

minimizing bundle size #12834

Closed
michael-land opened this issue Sep 10, 2018 · 2 comments
Closed

minimizing bundle size #12834

michael-land opened this issue Sep 10, 2018 · 2 comments

Comments

@michael-land
Copy link
Contributor

michael-land commented Sep 10, 2018

The docs recommended use Babel plugin to minimizing bundle size. https://material-ui.com/guides/minimizing-bundle-size/

I am using "with babel-plugin-import", but the follow import statement will cause importing all the components. Because there is no such @material-ui/core/withStyles path.

import { withStyles } from '@material-ui/core';

but import { withStyles } from '@material-ui/core/styles' will do the trick

@oliviertassinari
Copy link
Member

@xiaoyu-tamu Thanks for the feedback. It's something we can address by moving the style folder into its own package @material-ui/styles.

@oliviertassinari
Copy link
Member

@eps1lon Has added esm support: #13391. We can close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants