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
@xiaoyu-tamu Thanks for the feedback. It's something we can address by moving the style folder into its own package @material-ui/styles.
@eps1lon Has added esm support: #13391. We can close.
Most helpful comment
@xiaoyu-tamu Thanks for the feedback. It's something we can address by moving the style folder into its own package
@material-ui/styles.