You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/pages/guides/minimizing-bundle-size/minimizing-bundle-size.md
+13-8Lines changed: 13 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,20 +9,25 @@ on every commit for every package and critical parts of those packages ([view th
9
9
Combined with [dangerJS](https://danger.systems/js/) we can inspect
10
10
[detailed bundle size changes](https://github.com/mui-org/material-ui/pull/14638#issuecomment-466658459) on every Pull Request.
11
11
12
-
## How to reduce the bundle size?
12
+
## When and how to use tree-shaking?
13
13
14
-
For convenience, Material-UI exposes its full API on the top-level `material-ui` import.
15
-
If you're using ES6 modules and a bundler that supports tree-shaking ([`webpack` >= 2.x](https://webpack.js.org/guides/tree-shaking/), [`parcel` with a flag](https://en.parceljs.org/cli.html#enable-experimental-scope-hoisting/tree-shaking-support)) you can safely
16
-
use named imports and expect only a minimal set of Material-UI components in your bundle:
14
+
Tree-shaking of Material UI works out of the box in modern frameworks. Material UI exposes its full API on the top-level
15
+
`material-ui` import. If you're using ES6 modules and a bundler that supports tree-shaking
0 commit comments