title: Change ESM export bindings
body: <p>I'm wondering how the exported bindings of an ES6 module work when destructuring. I'm exporting an object (<code>thing</code>) as a named export -- but also one of its properties (<code>foo</code>), too, which I'm later updating.</p>
  <p>This update works when I import the object and reference its prop, but not when I directly import <code>foo</code>, as shown below.  I'm guessing the <code>export const...</code> creates a new, immutable binding, but is there any way to retain its reference to the original object upon export?</p>
  <pre><code>// module: 'thing.js'
  
  let thing = {
    foo: (x) =&gt; console.log(x)
  };
  
  const init = () =&gt; {
    thing.foo = (x) =&gt; console.log(&quot;updated&quot;);
  };
  
  export { init, thing };
  export const { foo } = thing;
  </code></pre>
  <pre><code>// index.js
  
  import { foo, thing, init } from &quot;./thing&quot;;
  
  init();
  
  foo(&quot;test&quot;);        // does not work
  thing.foo(&quot;test&quot;);  // update is reflected, here
  </code></pre>
  <p><a href="https://codesandbox.io/embed/admiring-keldysh-o7ckds?fontsize=14&amp;hidenavigation=1&amp;theme=dark" rel="nofollow noreferrer">codesandbox</a></p>