nuxt-community / fontawesome-module

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

Regular free icon not showing in production build #47

Open bhuvidya opened 2 years ago

bhuvidya commented 2 years ago

Loads fine on local dev, but not loading on a SSR build on live server.

The markup in my vue page component is:

<fa-icon class="copy-icon" :icon="['far', 'copy']" />

Inspecting page code on the live site I can see the html has the fa-icon markup as follows, instead of svg:

<fa-icon icon="far,copy" class="copy-icon"></fa-icon>

Any help greatly appreciated.

Nuxt 2.15.8 @nuxtjs/fontawesome: ^1.1.2 @fortawesome/free-regular-svg-icons: ^6.1.1 @fortawesome/vue-fontawesome: 0.1.10 (via @nuxtjs/fontawesome)

nuxt.config.js:

buildModules: [
    ['@nuxtjs/fontawesome', {
      component: 'fa',
      icons: {
        regular: [ 'faCopy' ],
      },
    }],
]
bhuvidya commented 2 years ago

Ok I have found the issue - I need to explicitly set the "suffix" config parameter to false - on my dev site it seems to default to true as I need to use <fa-icon> (not <fa>), whereas on my live site build it seems to default correctly to false.