title: ES6/Babel Class constructor cannot be invoked without 'new'
body: <p>I'm trying to create a custom Quill theme, extending the bubble one. I'm facing a strange ES6 inheritance problem, where it seems I cannot call <code>super()</code> in my constructor. Here is my code:</p>
  
  <pre><code>import BubbleTheme, { BubbleTooltip } from 'quill/themes/bubble'
  
  class LoopTheme extends BubbleTheme {
    constructor (quill, options) {
      super(quill, options)
    }
  
    extendToolbar (toolbar) {
      super.extendToolbar(toolbar)
      this.tooltip = new LoopTooltip(this.quill, this.options.bounds);
      this.tooltip.root.appendChild(toolbar.container);
    }
  }
  
  class LoopTooltip extends BubbleTooltip {
  
  }
  
  LoopTooltip.TEMPLATE = [
    '&lt;span class="ql-tooltip-arrow"&gt;&lt;/span&gt;',
    '&lt;div class="ql-tooltip-editor"&gt;',
      '&lt;input type="text" data-formula="e=mc^2" data-link="https://myurl.com" data-video="Embed URL"&gt;',
      '&lt;a class="ql-close"&gt;&lt;/a&gt;',
    '&lt;/div&gt;'
  ].join('');
  
  export { LoopTooltip, LoopTheme as default }
  </code></pre>
  
  <p>Bubble theme could be found <a href="https://github.com/quilljs/quill/blob/develop/themes/bubble.js" rel="noreferrer">here</a></p>
  
  <p>My Babel presets:</p>
  
  <pre><code>{
      "presets": [
          "es2015",
          "es2016",
          "stage-0",
          "react"
      ]
  }
  </code></pre>
  
  <p>Webpack js file config:</p>
  
  <pre><code>  module: {
      rules: [
        {
          test: /\.js$/,
          include: [
            resolve(__dirname, 'app')
          ],
          loader: 'babel-loader',
          exclude: /node_modules/
        }, {...
  </code></pre>
  
  <p>Output generated code:</p>
  
  <pre><code>var LoopTheme = function (_BubbleTheme) {
    _inherits(LoopTheme, _BubbleTheme);
  
    function LoopTheme() {
      _classCallCheck(this, LoopTheme);
  
      return _possibleConstructorReturn(this, (LoopTheme.__proto__ || Object.getPrototypeOf(LoopTheme)).apply(this, arguments));
    }
  
    _createClass(LoopTheme, [{
      key: 'extendToolbar',
      value: function extendToolbar(toolbar) {
        _get(LoopTheme.prototype.__proto__ || Object.getPrototypeOf(LoopTheme.prototype), 'extendToolbar', this).call(this, toolbar);
        this.tooltip = new LoopTooltip(this.quill, this.options.bounds);
        this.tooltip.root.appendChild(toolbar.container);
      }
    }]);
  
    return LoopTheme;
  }(_bubble2.default);
  
  var LoopTooltip = function (_BubbleTooltip) {
    _inherits(LoopTooltip, _BubbleTooltip);
  
    function LoopTooltip() {
      _classCallCheck(this, LoopTooltip);
  
      return _possibleConstructorReturn(this, (LoopTooltip.__proto__ || Object.getPrototypeOf(LoopTooltip)).apply(this, arguments));
    }
  
    return LoopTooltip;
  }(_bubble.BubbleTooltip);
  
  LoopTooltip.TEMPLATE = ['&lt;span class="ql-tooltip-arrow"&gt;&lt;/span&gt;', '&lt;div class="ql-tooltip-editor"&gt;', '&lt;input type="text" data-formula="e=mc^2" data-link="myurl.com" data-video="Embed URL"&gt;', '&lt;a class="ql-close"&gt;&lt;/a&gt;', '&lt;/div&gt;'].join('');
  
  exports.LoopTooltip = LoopTooltip;
  exports.default = LoopTheme;
  </code></pre>
  
  <p>I'm having the following error: <code>events.js:59 Uncaught TypeError: Class constructor BubbleTheme cannot be invoked without 'new'</code>. However, the <code>LoopTheme</code> is correctly called with <code>new</code> by Quill <a href="https://github.com/quilljs/quill/blob/develop/core/quill.js#L84" rel="noreferrer">here</a>. When I debug step by step, I correctly enter the <code>LoopTheme</code> constructor, and the error is raised when <code>super</code> is called.</p>
  
  <p>Am I missing something here? I've always used inheritance, and I use it elsewhere in my code (between my classes), where here am I having trouble?</p>
  
  <p>Thanks for your help</p>