Hi Developers
** Step 1.**
Install these packages.
yarn add @nuxtjs/fontawesome -D
then add free sets of icons
yarn add @nuxtjs/fontawesome @fortawesome/free-solid-svg-icons @fortawesome/free-brands-svg-icons -D
Step 2.
Add font awesome to nuxt.config.js file
// nuxt.config.js
buildModules: [
'@nuxtjs/fontawesome',
],
Step 3.
Add this configuration
fontawesome: {
component: 'Fa',
suffix: false,
icons: {
solid: true,
brands: true,
},
},
Step 4
How to use them in .vue
file
<fa :icon="['fas', 'adjust']" />
...
Check the video link -> Install Font awesome icons to Nuxt 2
Bye bye Developers
Top comments (0)