title: Font Awesome 5 Bundle via NPM
body: <p>I'm trying to bundle only required Font Awesome 5 icons via webpack, but the icons are not replaced in the DOM.</p>
  
  <ol>
  <li><p>I've added all required packages from the <a href="https://fontawesome.com/how-to-use/use-with-node-js#pro" rel="noreferrer">documentation</a>:</p>
  
  <pre><code>yarn add -D @fortawesome/fontawesome
  yarn add -D @fortawesome/fontawesome-pro-solid
  yarn add -D @fortawesome/fontawesome-pro-regular
  yarn add -D @fortawesome/fontawesome-free-brands
  </code></pre></li>
  <li><p>The following custom JS is included:</p>
  
  <pre><code>"use strict";
  
  import fontawesome from '@fortawesome/fontawesome';
  import faCheck from '@fortawesome/fontawesome-pro-regular/faCheck';
  
  fontawesome.icon(faCheck);
  
  function iconsDoneRendering () {
      console.log('Icons have rendered'); // No output in console
  }
  
  fontawesome.dom.i2svg({ 
      callback: iconsDoneRendering,
  })
  </code></pre></li>
  <li><p>The HTML template:</p>
  
  <pre><code>&lt;head&gt;
      &lt;link rel="stylesheet" href="/css/app.css?v2.1.4"&gt; &lt;!-- contains fa-svg-with-js.css --&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;ul class="fa-ul"&gt;
          &lt;li&gt;&lt;span class="fa-li"&gt;&lt;i class="far fa-phone"&gt;&lt;/i&gt;&lt;/span&gt;List item 1&lt;/li&gt;
          &lt;li&gt;&lt;span class="fa-li"&gt;&lt;i class="far fa-check"&gt;&lt;/i&gt;&lt;/span&gt;List item 2&lt;/li&gt;
      &lt;/ul&gt;
      &lt;script src="/js/app.js?v2.1.4"&gt;&lt;/script&gt;
  &lt;/body&gt;
  </code></pre></li>
  </ol>
  
  <p>The svg path is inside the bundled JS file, but I can't figure out which method needs to be called.</p>
  
  <hr>
  
  <p>The following JS code solves the problem (since v5.0.2):</p>
  
  <pre><code>"use strict";
  
  import fontawesome from '@fortawesome/fontawesome';
  import faCheck from '@fortawesome/fontawesome-pro-regular/faCheck';
  import faPhone from '@fortawesome/fontawesome-pro-regular/faPhone';
  
  fontawesome.library.add(faCheck,faPhone);
  </code></pre>