title: ES6 Import multiple files and extend main object
body: <p>i would like to extend <code>A</code> in <code>main.js</code> using multiple import files, example</p>
  
  <pre><code>// main.js
  A = {
      a : 0
  };
  
  import './b.js'
  import './c.js'
  ...
  
  export default A;
  </code></pre>
  
  <p></p>
  
  <pre><code>// b.js
  import A from './main.js'
  
  A.b = 1;
  </code></pre>
  
  <p></p>
  
  <pre><code>// c.js
  import A from './main.js'
  
  A.c = 2;
  </code></pre>
  
  <p></p>
  
  <pre><code>// App.js
  import A from './main.js'
  
  console.log(A);
  </code></pre>
  
  <p></p>
  
  <p>what i get in <code>console.log(A)</code> is <code>{ a : 0 }</code></p>
  
  <p>how to extend <code>A</code> in <code>main.js</code> and while import to <code>App.js</code>, <code>A</code> will be extended to</p>
  
  <pre><code>A = {
      a : 0,
      b : 1,
      c : 2
  }
  </code></pre>