title: Best practice for NPM package with es6 modules - bundle or not
body: <p>Writing an NPM package containing es6 modules, is it best practice to keep the source files separate</p>
  <pre><code>package.json
  esm
   index.js
   Content1
    Content1A.js
    Content1A.js.map
    Content1B.js
    Content1B.js.map
   Content2
    Content2A.js
    Content2A.js.map
    Content2B.js
    Content2B.js.map
  </code></pre>
  <p>with <code>index.js</code> referencing contents in subfolders, or is it better practice to bundle it into one file</p>
  <pre><code>package.json
  esm
   contents.js
   contents.js.map
  </code></pre>
  <p>Seems the first method has an advantage with CommonJS modules since it gives a consumer possibility to import directly from the source and thus skip unused imports from <code>index.js</code> (since CommonJS modules are not tree-shakeable) but with es6 modules, this argument disappears.</p>