title: TypeError: _this2.function is not a function
body: <p>I have a small library with few classes. In one of the class, i am using method from other classes, thus I instantiate them, and use it in the code.</p>
  
  <p>Some of the classes I use reference method with the <code>this</code> keyword.</p>
  
  <p>example:</p>
  
  <pre><code>// index.js
  import Class1 from './class1'
  import Class2 from './class2'
  import Class3 from './class3'
  
  export {
     Class1,
     Class2,
     Class3
  }
  
  // class1.js
  export default Class1 {
     func1() {
        return 'something';
     }
  
    func2() {
        return this.func1() + 'else';
    }
  
  }
  
  // class2.js
  export default Class2 {
     func1() {
        return 'something';
     }
  
    func2() {
        return this.func1() + 'else again';
    }
  
  }
  
  // class3.js
  
  import {Class1, Class2} from './index';
  const c1 = new Class1();
  const c2 = new Class2();
  
  export default Class3 {
     funcNotWorking(){
         return c1.func2() + c2.func3() + 'this does not work'
     }
  
  }
  </code></pre>
  
  <p>I am using this in tests by just importing it:</p>
  
  <pre><code>// test.js
  const c3 = require('library.js').Class3
  
  // test stuff calling:
  c3.funcNotWorking()
  </code></pre>
  
  <p>I am compiling this with webpack and babel loader. This config seems to work as it compiles and everything else works, but this...</p>
  
  <p>I have read that people seem to have trouble with this with React, but this is just Es6. Could someone point me to how to resolve this?</p>