title: How to add Font Awesome in Vue.js
body: <p>I'm trying to use Font Awesome with Vue 3. I have made a separate file for font awesome Icons here, but not sure if this is the correct way to add icons in Vue.</p>
  <p>main.js:</p>
  <pre><code>import { createApp } from 'vue'
  import App from './App.vue'
  import { FontAwesomeIcon } from &quot;@fortawesome/vue-fontawesome&quot;;
  
  createApp(App).component(&quot;font-awesome-icon&quot;, FontAwesomeIcon).mount('#app')
  
  </code></pre>
  <p>fontawesome-icons.js file:</p>
  <pre><code>import { library } from &quot;@fortawesome/fontawesome-svg-core&quot;;
  import { faUndo } from &quot;@fortawesome/free-solid-svg-icons&quot;;
  import { FontAwesomeIcon } from &quot;@fortawesome/vue-fontawesome&quot;;
  
  library.add(faUndo);
  
  export default FontAwesomeIcon;
  </code></pre>
  <p>Task.vue:</p>
  <pre><code>&lt;template&gt;
    &lt;div&gt;
      &lt;font-awesome-icon :icon=&quot;['fas', 'Undo']&quot; /&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  <p>Please any help would be appreciated.</p>