title: How to import "old" ES5 code in ES6
body: <p>I have an <code>ES6</code> application (with <code>Babel 6.5</code> and <code>Webpack</code>) and it successfully imports my modules like this:</p>
  
  <pre><code>import $ from 'jquery';
  </code></pre>
  
  <p>I wanted to install <a href="https://github.com/robflaherty/riveted/blob/master/riveted.js" rel="noreferrer">https://github.com/robflaherty/riveted/blob/master/riveted.js</a> (a plugin for Google Analytics), but as you can see, the code doesn't have something like <code>module.exports = ...</code>, it only defines a global variable <code>riveted</code>, but it has an apparently valid <code>package.json</code> pointing to <code>riveted.js</code>. </p>
  
  <p>So doing something like </p>
  
  <pre><code>import riveted from 'riveted'
  riveted.init();
  </code></pre>
  
  <p>throws an error: </p>
  
  <blockquote>
    <p>_riveted2.default.init is not a function</p>
  </blockquote>
  
  <pre><code>import riveted from 'riveted'
  riveted.init();</code></pre>
  
  <pre><code>import 'riveted'
  riveted.init();
  </code></pre>
  
  <p>throws an error: </p>
  
  <blockquote>
    <p>riveted is not defined </p>
  </blockquote>
  
  <pre><code>import * as riveted from 'riveted'
  riveted.init();
  </code></pre>
  
  <p>throws an error:</p>
  
  <blockquote>
    <p>riveted.init is not a function</p>
  </blockquote>
  
  <p>How can I access riveted's init() function?</p>