title: Webpack dynamic require throwing error
body: <p>I have the following piece of code that works well:</p>
  
  <pre><code>require.ensure(['./core/sample-form.js'], require =&gt; {
      require('./core/sample-form.js');  
  });
  </code></pre>
  
  <p>Now if I put that string into a variable:</p>
  
  <pre><code>const ajaxJs = './core/sample-form.js';
  require.ensure([ajaxJs], require =&gt; {
      require(ajaxJs);  // eslint-disable-line import/no-dynamic-require
  });
  </code></pre>
  
  <p>It throws the following error:</p>
  
  <blockquote>
    <p>Uncaught (in promise) Error: Cannot find module "." at webpackMissingModule</p>
  </blockquote>
  
  <p>Is there any way I can use a variable for that require?</p>