You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[X] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Current behavior
Since the change to include Chart.js via an import instead of relying on global variable, there are 2 issues.
If you follow the documentation and include chart.js via the scripts in angular.json, chart.js will get included twice in bundles. see the commit here
The other side effect of this change is that moment.js will be included in webpack builds, whereas referencing as a global variable it does not get included into bundles.
Expected behavior
The documentation should be changed to not state that chart.js needs to be included via scripts.
not sure what the solution should be here. Either we have to wait until Chart.js 3.0, revert the above change or use ngx-build-plus to exclude moment?
What is the motivation / use case for changing the behavior?
The bundles are much bigger when using chart component because of the inclusion of moment.js and the double-entry of chart.js
Angular version: 8.X
Angular version 8 and above
PrimeNG version: 8.X
PrimeNG 8 and above
The text was updated successfully, but these errors were encountered:
cagataycivici
changed the title
Chart component bundle size
Improve chart.js documentation
Apr 6, 2020
cagataycivici
changed the title
Improve chart.js documentation
Improve chart documentation
Apr 6, 2020
A solution for number 2, may not work for everyone but the project I work on I did not want moment at all. Since this is an optional dependency on chart.js I found this solution
For reference, add this to package.json. Seems webpack will exclude moment from the bundles
I'm submitting a ... (check one with "x")
Current behavior
Since the change to include Chart.js via an import instead of relying on global variable, there are 2 issues.
If you follow the documentation and include chart.js via the scripts in angular.json, chart.js will get included twice in bundles. see the commit here
The other side effect of this change is that moment.js will be included in webpack builds, whereas referencing as a global variable it does not get included into bundles.
Expected behavior
The documentation should be changed to not state that chart.js needs to be included via scripts.
not sure what the solution should be here. Either we have to wait until Chart.js 3.0, revert the above change or use ngx-build-plus to exclude moment?
What is the motivation / use case for changing the behavior?
The bundles are much bigger when using chart component because of the inclusion of moment.js and the double-entry of chart.js
Angular version: 8.X
Angular version 8 and above
PrimeNG version: 8.X
PrimeNG 8 and above
The text was updated successfully, but these errors were encountered: