My app is quite heavily invested in material-ui, and I love the package! However, I’m by far not using most of the components, which are all imported into my app, adding a crazy 450kB to my bundle size.
Has anyone been able to reduce this to only the components that are used in the app?
I’m also really unsure about how meteor handles imports in subdirectories:
import RaisedButton from 'material-ui/RaisedButton';
Isn’t this supposed to only import the files necessary to make that component work?
@skirunman, I tried what you suggested but it does not work, the browser returns a nasty error, material-ui components can’t be imported like that.
I spun up a new project, tried to import only a RaisedButton the original way, and I saw that the module size was only 80kB, much better. So somewhere in my large app I’m doing something wrong, as it imports all of the components regardless. I’ll update this if I find out what it is.