title: Convert old JavaScript code into ES6 module
body: <p>I'm trying to convert an old JavaScript library into ES6 compatible module.
  The library is tracking.js (<a href="https://github.com/eduardolundgren/tracking.js/blob/master/build/tracking.js" rel="nofollow noreferrer">https://github.com/eduardolundgren/tracking.js/blob/master/build/tracking.js</a>) but all my results ends with: <code>Cannot read property 'xxx' of undefined</code></p>
  <p>Is there any easy way to use such module? I'm trying to create just basic example like <a href="https://trackingjs.com/docs.html#step-2" rel="nofollow noreferrer">https://trackingjs.com/docs.html#step-2</a></p>
  <h1>Update</h1>
  <p>Because there is a request for more code. Let me show one of the non-working examples (part of Vue.js component):</p>
  <pre><code>import tracking from 'tracking';
  
  export default {
    created() {
      const colors = new tracking.ColorTracker(['magenta', 'cyan', 'yellow']);
    }
  };
  </code></pre>
  <p>And the error is <code>TypeError: _tracking2.default.ColorTracker is not a constructor</code></p>