Shevtsov Eugene
Shevtsov Eugene

Reputation: 33

Why aren't some fontAwesome icons missing?

I want to connect fa in vue Doing

*************
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { faVuejs } from '@fortawesome/free-brands-svg-icons'
******************
library.add(faVuejs);
Vue.component('font-awesome-icon', FontAwesomeIcon)
************

In component:

<font-awesome-icon :icon="[ 'fab', 'twitter' ]" />

Console error:

Could not find one or more icon(s) {prefix: "fab", iconName: "twitter"}

But, if im use:

<font-awesome-icon :icon="[ 'fab', 'vuejs' ]" />

Working fine ... What's wrong?

Upvotes: 1

Views: 410

Answers (1)

tony19
tony19

Reputation: 138576

You have to import the faTwitter icon, and add it to the library like you're doing with the Vue icon:

import { faTwitter } from '@fortawesome/free-brands-svg-icons'

library.add(faTwitter)

demo

Upvotes: 2

Related Questions