title: How do I correctly include Moment.js and Chart.js with RequireJS when I want to create charts with time scales?
body: <p>I use <a href="http://requirejs.org/" rel="nofollow noreferrer">RequireJS</a> to include <a href="https://momentjs.com/" rel="nofollow noreferrer">Moment.js</a> and <a href="http://www.chartjs.org/" rel="nofollow noreferrer">Chart.js</a> to create charts with time scales.</p>
  
  <p>I found an example at <a href="https://codepen.io/adrianhurt/pen/dXRRoL" rel="nofollow noreferrer">https://codepen.io/adrianhurt/pen/dXRRoL</a> to include both but it doesn't seems to be the correct way. </p>
  
  <pre><code>require.config({
    paths: {
      jquery: 'https://code.jquery.com/jquery-2.2.4.min',
      moment: 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment',
      chartjs: 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.6/Chart'
    },
    shim: {
      jquery: {
        exports: '$'
      },
      chartjs: {
        deps: [ 'moment' ]
      }
    }
  });
  </code></pre>
  
  <hr>
  
  <pre><code>require(['jquery', 'moment', 'chartjs'], function($ ,moment, Chart) ...
  </code></pre>
  
  <p>When I create a chart the exception <code>Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com</code> will be thrown.</p>
  
  <p>Therefore my question is, <em>how do I correctly include Moment.js and Chart.js with RequireJS when I want to create charts with time scales?</em></p>
  
  <p>Please note that the Chart.js bundle is not an alternative for me, because I need Moment.js also separately.</p>