title: ES6 classes, with parent in different file, and node.js?
body: <p>What is the right way to use a class defined in one file and extend it another, in node.js?</p>
  
  <p>Currently I have:</p>
  
  <pre><code>'use strict'
  
  class BasePageHandler {
  
      constructor(app, settings, context) {
  
      }
  }
  
  return module.exports;
  </code></pre>
  
  <p>In the 'child' class file I have:</p>
  
  <pre><code>'use strict'
  
  var BasePageHandler = require ('./../BasePageHandler.js');
  
  class FrontpagePageHandler extends BasePageHandler {
      constructor(app, settings, context) {
           super(app, settings, context);
           this.settings = settings;
           this.context = context;
      }
  }
  </code></pre>
  
  <p>This fails with the following error:</p>
  
  <pre><code>TypeError: Class extends value #&lt;Object&gt; is not a function or null
  </code></pre>
  
  <p>Note, if I have the BasePageHandler in the same file then it works, so it is really when the class is in another file I have an issue.</p>
  
  <p>Currently using node 4.4.0.</p>