b-gran/object-editor-react

`material-ui-icons` is too big

gimdongwoo opened this issue · 6 comments

Thank you.

Fisrt of all, object-editor-react is a great components!

But, object-editor-react need to tree shaking.

2018-05-13 6 46 52

Thanks for opening an issue @gimdongwoo.

I'll look into the bundle size. What tool did you use to generate this visualization?

Here :)
https://www.npmjs.com/package/webpack-bundle-analyzer

And, this warning is appeared on build.

npm WARN deprecated material-ui-icons@1.0.0-beta.36: Use @material-ui/icons instead

Just published a new version (1.0.4) that allows module bundlers to omit most of the icon modules.

Here are the numbers (for a test project with just object-editor-react as a dependency):
screen shot 2018-05-13 at 2 13 20 pm

One thing to keep in mind: the object-editor-react bundle only contains the object-editor-react source, so we can't do any additional tree shaking on the object-editor-react bundle itself.

Let us know if this reduces your bundle size :)

Awesome!!

Thank you 👍

[before]
kakaotalk_photo_2018-05-13-22-30-50

[after]
2018-05-13 10 30 11

I really appreciate your super fast response!

Happy to hear this helped 😄 I've also got plans to improve the bundle even more in the future.

Going to close this for now but feel free to raise another issue if the bundle size is still giving you trouble.