title: Angular library bundle dependencies
body: <p>I've created and bundled an Angular (7.2.0) Library using the CLI:</p>
  <blockquote>
  <p>ng g library MyLibrary</p>
  <p>ng build MyLibrary</p>
  </blockquote>
  <p>This gives me the <code>my-libary.umd.js</code> bundle that I need.</p>
  <p>Currently, all dependencies are added as peerDependencies in the library package.json. What I would like to do is to actually bundle some dependencies with the library (.umd). Adding them as &quot;<code>dependencies</code>&quot; instead of &quot;<code>peerDependencies</code>&quot; does not seem to do the trick, I don't really see what the difference is?</p>
  <p>How can I do that?</p>
  <p>Example of package.json where ngx-spinner should be bundled</p>
  <pre><code>{
    &quot;name&quot;: &quot;demo-plugin&quot;,
    &quot;version&quot;: &quot;0.0.1&quot;,
    &quot;peerDependencies&quot;: {
      &quot;@angular/common&quot;: &quot;^7.1.0&quot;,
      &quot;@angular/core&quot;: &quot;^7.1.0&quot;
    },
    &quot;dependecies&quot;: {
      &quot;ngx-spinner&quot;: &quot;^7.1.4&quot;
    },
    &quot;bundledDependencies&quot;: [
      &quot;ngx-spinner&quot;
    ]
  }
  </code></pre>