title: TypeError: Super expression must be null or a function, not undefined with Babeljs
body: <p>I'm currently trying to make multiple-files inheritance in ES6, with node.JS and Babel (I'm using Babel to convert the code from ES6 to ES5 'cause Node don't implement ES6 right now).
  I'm using import/export to "link" the differents files.</p>
  
  <p>Actually I have :
  <strong>Parent Class (File 1)</strong></p>
  
  <pre><code>export class Point
  {
      constructor(x, y)
      {
          this.x = x;
          this.y = y;
      }
  
      toString() {
          return '(' + this.x + ', ' + this.y + ')';
      }
  }
  </code></pre>
  
  <p>And :
  <strong>Child Class (File 2)</strong></p>
  
  <pre><code>import Point from './pointES5'
  
  export class ColorPoint extends Point
  {
      constructor(x, y, color)
      {
          super(x, y);
          this.color = color;
      }
  
      toString() {
          return super.toString() + ' in ' + this.color;
      }
  }
  </code></pre>
  
  <p>And the main
  <strong>Main (File 3)</strong></p>
  
  <pre><code>import Point from './pointES5'
  import ColorPoint from './colorpointES5'
  
  var m_point = new Point();
  var m_colorpoint = new ColorPoint();
  
  console.log(m_point.toString());
  console.log(m_colorpoint.toString());
  </code></pre>
  
  <p>I'm doin' that to test the toString() methods calls, from Parent and from Child.<br>
  So then I use Babel to convert the code from ES6 to ES5 and I run each parts separately to test if it's ok or not.<br>
  - Point (the Parent) is good, and execute without error.<br>
  - ColorPoint (the Child) don't run completely and throw :  </p>
  
  <blockquote>
    <p>TypeError: Super expression must either be null or a function, not undefined</p>
  </blockquote>
  
  <p>The first line of the StackTrace is :</p>
  
  <blockquote>
    <p>function _inherits(subClass, superClass) { if (typeof superClass !== 'function' &amp;&amp; superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass &amp;&amp; superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.<strong>proto</strong> = superClass; }
    (It comes from the ES5 converted code (Babelified), and I can post it entirely if it's needed).</p>
  </blockquote>
  
  <p>It is frustrating cause this code is very simple...
  But I don't see what is causing the error.</p>
  
  <p>I try differents versions of Babel (5, 5.8, 6) but there is no differences...</p>
  
  <p>What have I done wrong ?</p>
  
  <p>PS : I forgot to tell : it WORKS PERFECTLY when I do that in just one file. But it's really important to me to have only one class by file...</p>