title: Is it possible to import/require js function via webpack?
body: <p>I have a vanilla JS library. Let's say:</p>
  
  <p><em>call-my-name.js</em></p>
  
  <pre><code>function CallMyName (name) { alert(name); }
  </code></pre>
  
  <p>And I want to use this method in other (.ts) file;</p>
  
  <p><em>big-class.ts</em></p>
  
  <pre><code>import CallMyName from './call-my-name.js'
  
  export class BigClass {
  
      constructor () {
          CallMyName ('test');
      }
  }
  </code></pre>
  
  <p>I've tried:</p>
  
  <pre><code>import CallMyName from 'script-loader!./call-my-name.js'
  import CallMyName from 'babel-loader!./call-my-name.js'
  </code></pre>
  
  <p><em>but it's not module, so got error</em></p>
  
  <pre><code>require('./call-my-name.js') 
  </code></pre>
  
  <p><em>returns {}</em></p>
  
  <p>The main thing - I can't change JS file. It's 3rd party library.</p>
  
  <p>(but just adding <em>export default CallMyName</em> solves the problem)</p>