title: Illegal constructor with EcmaScript 6
body: <p>First of all I would like that say that I don't really know how I can explain what I did on order to get the error mentioned in the title (<code>uncaught TypeError: Illegal constructor</code>). I am using gulpfile in order to compile my Ecmascript 6 to plain Javascript. My gulpfile looks like this:</p>
  
  <pre><code>var gulp = require('gulp');
  var concat = require('gulp-concat');
  var babel = require('gulp-babel');
  
  gulp.task('compile', function () {
      return gulp.src(['resources/assets/js/*.js', 'resources/assets/js/components/*.js'])
          .pipe(babel({
                  presets: ['es2015']
          }).on('error', logError))
          .pipe(concat('bundle.js'))
          .pipe(gulp.dest('public/js'));
  });
  
  gulp.task('watch', function () {
     gulp.watch('resources/assets/js/**/*', ['compile']);
  })
  
  gulp.task('default', ['watch']);
  
  function logError(err) {
      console.log(err);
  }
  </code></pre>
  
  <p>I have a filesystem where all files are concatenated to one file (bundle.js), after being compiled with Babel.  </p>
  
  <p>In the browsers console (either Chrome or Firefox), the error appears and it is located in the next line:</p>
  
  <pre><code>var _this = _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, element));
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/CGXGK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CGXGK.png" alt="The error within the console"></a></p>
  
  <p>This is the non-compiled code of this:</p>
  
  <pre><code>class Dropdown extends Node {
  
      constructor(element) {
          super(element);
  
          this.registerEvents(['click', 'change', 'blur']);
      }
  
      onClick() {
          this.$element.addClass('clicked');
      }
  }
  </code></pre>
  
  <p>And this is the compiled code of the same class:</p>
  
  <pre><code>var Dropdown = function (_Node) {
      _inherits(Dropdown, _Node);
  
      function Dropdown(element) {
          _classCallCheck(this, Dropdown);
  
          var _this = _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, element));
  
          _this.registerEvents(['click', 'change', 'blur']);
  
          return _this;
      }
  
      _createClass(Dropdown, [{
          key: 'onClick',
          value: function onClick() {
              this.$element.addClass('clicked');
          }
      }]);
  
      return Dropdown;
  }(Node);
  </code></pre>
  
  <p>I am not using <code>export default Dropdown</code> because I am not importing modules in other modules (this is not needed because every file is converted to one file, where everything is accessible).  </p>
  
  <p>I did some research and the only reason why peoeple got this error was because there was a capital letter where none was allowed. I didn't find anything else about the cause of this error. Does someone have an idea why I get this error? And does someone have a solution?</p>