Large Dependencies Should Not Be Bundled


Topic: Large Dependencies Should Not Be Bundled

iamjonmiller pro asked a year ago

Today I went to update to Chart.js 3.3.2. It is a large and involved migration process as a lot has changed since 2.9.4. As I began to get more familiar with the new structure I started to encounter strange bugs. After extensive debugging I realized that this was because Chart.js is built into MDB5 Standard. It's part of the main js file. So when I tried to access functions in 3.3.2 it was still running under the 2.9.4 build included.

Restructuring my imports to have vanilla chart.js after mdb fixed this, but I think this exposes a fundamental problem. Dependencies this large and complicated should not be included in a base file. Sure, give the option to bundle for optimization, but by default these things should be in separate files as has been done before.

If you guys want to included your own, stylized versions of common packages like Chart.js or dataTables that's awesome, but let's keep those easily separated so those of us who want to stay up to date on individual packages can do that.


Grzegorz Bujański staff answered a year ago

We plan to update charts.js to the latest version.

We decided to add charts.js to dependencies in order to be able to use our package without having to manually install additional libraries. But we will discuss in the team the possibility of changing that.


iamjonmiller pro commented a year ago

Thanks! I totally understand the desire to make it super convenient. Is there any way we could break out these features from our build of MDB?


Michał Duszak staff commented a year ago

It's hard to say how it will affect our package, as we haven't tested this option.


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
  • User: Pro
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.7.1
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No