i tried this-
import { library } from '@fortawesome/fontawesome-svg-core'
import { faFacebook } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
library.add(faFacebook)
Vue.component('font-awesome-icon', FontAwesomeIcon)
But apparently there's no faFacebook in free-svg-icons. How to include the facebook icon?
I faced the same problem. Solved with this:
terminal:
npm install --save @fortawesome/free-brands-svg-icons
main.js:
import { faFacebook } from '@fortawesome/free-brands-svg-icons'
library.add(faFacebook)
inside code:
<font-awesome-icon :icon="{ prefix: 'fab', iconName: 'facebook' }"/>
check the fontawesome-free-brands
for faFacebookSquare
import { faFacebookSquare, faFacebookMessenger } from '@fortawesome/fontawesome-free-brands';
does that work?
edit
just saw that faFacebookF
is available there too, I just missed it
import { faFacebookF } from '@fortawesome/fontawesome-free-brands';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With