nuxt-community / fontawesome-module

Module to use Font Awesome icons in Nuxt.js
MIT License
110 stars 12 forks source link

Could not find one or more icon #18

Closed Kazuto closed 4 years ago

Kazuto commented 4 years ago

I've did everything the Readme told me to, but I can't get any icons to work if I try to import them in my nuxt.config.js, only when I import them directly in a component.

Could not find one or more icon(s) {
  prefix: 'fas',
  iconName: 'faGithub'
} {}
buildModules: [
    [
      '@nuxtjs/fontawesome',
      {
        component: 'fa',
      },
    ],
  ],
fontawesome: {
  icons: {
    brands: ['faGithub'],
  },
},
<fa icon="faGithub" />
pimlie commented 4 years ago

See: https://github.com/FortAwesome/vue-fontawesome#using-brand-icons

You need to use <fa :icon="['fab', 'github']" /> instead.

Also reading this could be helpful: https://github.com/FortAwesome/vue-fontawesome#why-so-explicit-the-iconfar-coffee-syntax :)

Kazuto commented 4 years ago

Ah I see. Thanks for the answer :)