title: Why use bundled code as entry point in package.json?
body: <p>I've noticed a trend of <code>package.json</code> files that have a <code>main</code> value pointing to a <code>dist/</code> folder, for example:</p>
  
  <pre><code>{
    "name": "foo",
    "version": "1.0.0",
    "main": "dist/foo.js"
  }
  </code></pre>
  
  <p>(where <code>dist/</code> is usually the output of a build tool such as Webpack)</p>
  
  <p>I usually expect <code>main</code> to be the source entry point, something like <code>src/index.js</code>.</p>
  
  <p>What's the rationale for using bundled code as an entry point? Doesn't this get complicate dependency management, since another library that consumes <code>foo</code> doesn't necessarily know what's been included in <code>dist/foo.js</code>? (It could its own dependencies, or it might not.)</p>