Topic: Create builds with rollup instead of webpack
As for now, webpack doesn't have the ability to generate output in ES module format (https://github.com/webpack/webpack/issues/2933). Because of that, when importing mdbreact webpack tree shakedown doesn't work, so final bundle contains the entirety of both mdbreact and @material-ui.
Quick POC allowed to reduce my minified production bundle by 426862 bytes, which is 27% of whole vendor bundle. Admittedly, we are using only a handful of components in our project, but I doubt anyone is ever using everything.
Could you please consider update to package building process?
Here is an issue on your git: https://git.mdbootstrap.com/mdb/react/re-pro/issues/41 with the sample diff
Thank you so much!
Actually we're getting rid of external dependencies, so material-ui will soon disappear.
Of course we are going to bring up the full functionality of tree shaking, so your suggestion is very helpful.
We will come back with feedback when we test that.
Take care and keep hacking! :)
- User: Pro
- Premium support: No
- Technology: React
- MDB Version: 4.7.1
- Device: Desktop
- Browser: Chrome
- OS: Ubuntu
- Provided sample code: No
- Provided link: No