hupe1980 / gatsby-plugin-material-ui

Gatsby plugin for Material-UI with built-in server-side rendering support
MIT License
136 stars 25 forks source link

Minimize Bundle Size procedures recommended? #44

Closed valoricDe closed 4 years ago

valoricDe commented 4 years ago

In https://github.com/mui-org/material-ui/blob/master/docs/src/pages/guides/minimizing-bundle-size/minimizing-bundle-size.md it is recommend to use babel plugins to ensure that

import { Button, TextField } from '@material-ui/core';

are transpiled to:

import Button from '@material-ui/core/Button';
import TextField from '@material-ui/core/TextField';

I wonder if this also holds true for this the combination of gatsby and this plugin

oliviertassinari commented 4 years ago

@valoricDe The only advantage is development start-up time. For the core package, the impact is not very noticeable, maybe a dozen of seconds.

valoricDe commented 4 years ago

Ok, thank you for your feedback