Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Create builds with rollup instead of webpack

Codewave pro asked 6 years ago


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


bgining2this free commented 5 years ago

I am using MDB with react and rollup with no problems, do you want to see some of my setup?


Jakub Mandra staff commented 5 years ago

Hi,

If you would be so nice, we will be happy to see your setup (maybe we will find there something usefull).

We already worked on it and will release next version with Rollup as a production module bundler. It rocks!

Best,

Jakub


Jakub Mandra staff answered 6 years ago


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! :)



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.7.1
  • Device: Desktop
  • Browser: Chrome
  • OS: Ubuntu
  • Provided sample code: No
  • Provided link: No