title: Instantiate an object defined in module A and use its methods in module B javascript
body: <p>I'm working in a web development project.</p>
  <p>Right now i'm using a 3rd party library to instantiate an object of that library in a file called, let's say, fileA.js</p>
  <p>so i do:</p>
  <pre><code>import libraryExport from &quot;./librarymain.js&quot;
  
  var object = libraryExport( ... );
  export default object;
  </code></pre>
  <p>Now, in fileB.js i want to use the methods that the instantiated object has, for example:</p>
  <pre><code>import object from &quot;fileA.js&quot;
  object.methodOfTheLibrary();
  </code></pre>
  <p>However, when im running this in my browser console i always get &quot;methodOfTheLibrary is not a function&quot;, which means, from my point of view, that the library is not being imported properly in fileB.js</p>
  <p>Note: I'm using webpack to bundle all of my files and everything was compiling and bundling just fine until i came with issues. I usually know my way around C++ in an advanced way but for JS i just still don't fully understand how to solve these kind of import issues.</p>
  <p>Thank you for any help</p>