There were a couple of things that I needed to understand in Nuxt.js so hopefully this will make it quicker for other people as well
To have a global component in Nuxt, just create a plugin. Even if the documentation isn’t very clear on setting that up it works well if you look around the Github issue list
Font Awesome 5’s VueJS integration works well, but you need to keep in mind to install the icon categories.
Update: It got fixed in 1.1.3
Currently there’s an issue withFontawesome 5 SSR, follow toadkicker’s advice and go back a version.
That being said let’s create a plugin, I’ve called it font-awesome.js
|
|
Now we just need to add the plugin in nuxt.config.js
|
|
And this allows us to use the component in our page
|
|