I hope charts can remove momentjs

UI Components for Angular
Post Reply
luoxiao
Posts: 1
Joined: 20 Mar 2020, 09:50

20 Mar 2020, 09:57

Moment.js is installed along Chart.js as dependency!
I hope charts can remove moment.
moment in webpack,it's very huge.

Now we have a new tool to replace it.That is dayjs.
github:
https://github.com/iamkun/dayjs/

It familiar Moment.js API & patterns, but it's only 2KB in size

Here's my response from the author of charts.js:

For example, we can replace the moment with dayjs, and replace it with our own adapter
charts.js also support date-fns and Luxon: https://github.com/chartjs/awesome#datetime-adapters

If you want to completely remove the dependency:

For 2.x see here: https://www.chartjs.org/docs/latest/get ... rollup-etc
In 3.0 moment is no longer included. You can try 3.0.0-alpha as another alternative

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests