Material-ui: minimizing bundle size

Created on 10 Sep 2018  路  2Comments  路  Source: mui-org/material-ui

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

discussion

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.

All 2 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nathanmarks picture nathanmarks  路  100Comments

kybarg picture kybarg  路  164Comments

garygrubb picture garygrubb  路  57Comments

darkowic picture darkowic  路  62Comments

tleunen picture tleunen  路  59Comments