title: Datatable error on initialising via node require
body: <p>the code am using to require the datatables plugins is</p>
  
  <pre><code>window.$ = window.jQuery = require('jquery');
  
  dt = require('datatables.net')(window, $);
  dt_bs = require('datatables.net-bs')(window, $);
  buttons = require('datatables.net-buttons')(window, $);
  buttons_bs = require('datatables.net-buttons-bs')(window, $);
  responsive = require('datatables.net-responsive')(window, $);
  responsive_bs = require('datatables.net-responsive-bs')(window, $);
  colreorder = require('datatables.net-colreorder')(window, $);
  fixedheader = require('datatables.net-fixedheader')(window, $);
  scroller = require('datatables.net-scroller')(window, $);
  </code></pre>
  
  <p>but when I compile the assets and run the error am getting is</p>
  
  <pre><code>TypeError: this is undefined
  </code></pre>
  
  <p>I don't know what am doing wrong and yes I have tested the error comes from this section because if I comment out the section there is no error so any help would be highly appreciated, it's already driving me nuts. Thanks in advance.</p>
  
  <p><strong>P.S.</strong> <a href="https://datatables.net/download/npm" rel="nofollow noreferrer" title="This">This</a> is my reference</p>