Topic: Large Dependencies Should Not Be Bundled
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.
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.
Services & Consulting
Hire our experts to help you design or build a dedicated project.
- 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