title: What is harmony and what are harmony exports?
body: <p>What is this harmony exports? In fact, what is harmony?</p>
  
  <p><strong>Background</strong></p>
  
  <p>When I bundle stuff using Webpack and I look at the distribution source, it contains this one block always.</p>
  
  <pre><code>// define getter function for harmony exports
  __webpack_require__.d = function(exports, name, getter) {
      if(!__webpack_require__.o(exports, name)) {
          Object.defineProperty(exports, name, { enumerable: true, get: getter });
      }
  };
  </code></pre>
  
  <p>I Googled and found <a href="https://github.com/filipesilva/webpack-harmony-exports" rel="noreferrer">this page</a> but I understand nothing on it. As of today, this page reads like so:</p>
  
  <p><a href="https://i.stack.imgur.com/j2IeF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/j2IeF.png" alt="enter image description here"></a></p>
  
  <p>I googled more and <a href="https://stackoverflow.com/questions/11601443/javascript-harmony-what-it-is">found a similar question</a> asking what harmony is, but the asker never asked it in so many words and the only answer does not tell you what it is. </p>
  
  <p><strong>Question</strong></p>
  
  <p>So, what on God's own green earth is harmony? And then what are harmony exports?</p>
  
  <p>Reading the Stack Overflow tag description for 'ecmascript-harmony', I suspect it refers to ES6 module exports but I also think it isn't that, because immediately afterwards, the Webpack source distribution file has an <code>if</code> construct checking for whether the <code>entry</code> file it is processing exposes an ES 6 Module using the <code>export</code> statement.</p>
  
  <pre><code>// define __esModule on exports
  __webpack_require__.r = function(exports) {
      if(typeof Symbol !== 'undefined' &amp;&amp; Symbol.toStringTag) {
          Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
      }
      Object.defineProperty(exports, '__esModule', { value: true });
  };
  </code></pre>
  
  <p>So, it probably means something other than ES 6 modules exports? I suspect it is the <em>Common JS</em> style export as implemented in Node?</p>