Actions
Patch #44018
closedUpdate Chart.js to 4.5.1 and migrate to ES Modules
Status:
Closed
Priority:
Normal
Assignee:
Category:
Third-party libraries
Target version:
Description
This patch updates Chart.js to version 4.5.1 . Along with the update, the library has been migrated to ES Module (ESM) format, and the chart rendering logic has been refactored into a Stimulus controller.
To optimize performance, the Stimulus controller implements dynamic imports for Chart.js. If we were to import Chart.js at the top level, all users would be forced to download the library upon accessing Redmine. By using dynamic imports, the library is only downloaded when a chart actually needs to be rendered.
Since the official Chart.js distribution does not provide a pre-bundled ESM version suitable for this use case, I have modified the build settings in the following fork:
Files
Actions