2๐
โ
Iโve got the solution at https://github.com/chartjs/Chart.js/issues/4987.
requirejs.config({
paths: {
'moment': '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment',
'chartjs': '//cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart'
}
})
define('moment-adapter', ['moment'], function(moment) {
window.moment = moment;
return moment;
})
require(['moment-adapter', 'chartjs'], function(moment, Chart) {
...
})
Source:stackexchange.com