You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the steps provided on https://fontawesome.com/docs/web/use-with/vue/use-with#nuxt for Nuxt 3 results in the message "Could not find one or more icon(s)" in the nuxt console. The icon does work eventually but gets rendered after the page is loaded (no SSR), so results in flashing.
Full error: Could not find one or more icon(s) { prefix: 'fas', iconName: 'coffee' } {}
for the code <font-awesome-icon :icon="['fa-solid', 'coffee']" />
This issue was reported a while ago here: FortAwesome/vue-fontawesome#215 and seems to still get regular traffic from people running into the same problem.
The solution @redwarff proposed in FortAwesome/vue-fontawesome#215 (comment) seems to be the best solution, the message in the console is gone and SSR seems to be working correctly for icons. It just needs to be added to the documentation.
As a side-note, is there a better place to report issues about the documentation or contribute to it? I couldn't find any repository holding the documentation pages.
The text was updated successfully, but these errors were encountered:
Could you share some information about the status of this proposed documentation change?
It's such a waste that developers keep running into the mentioned problem while there is an easy solution available.
Bug description
Using the steps provided on https://fontawesome.com/docs/web/use-with/vue/use-with#nuxt for Nuxt 3 results in the message "Could not find one or more icon(s)" in the nuxt console. The icon does work eventually but gets rendered after the page is loaded (no SSR), so results in flashing.
Full error:
Could not find one or more icon(s) { prefix: 'fas', iconName: 'coffee' } {}
for the code
<font-awesome-icon :icon="['fa-solid', 'coffee']" />
This issue was reported a while ago here: FortAwesome/vue-fontawesome#215 and seems to still get regular traffic from people running into the same problem.
The solution @redwarff proposed in FortAwesome/vue-fontawesome#215 (comment) seems to be the best solution, the message in the console is gone and SSR seems to be working correctly for icons. It just needs to be added to the documentation.
The solution, add to
nuxt.config.ts
:So the full config for Fontawesome in combination with Nuxt 3 becomes:
Please modify https://fontawesome.com/docs/web/use-with/vue/use-with#nuxt to include the extra configuration option.
Reproducible test case
N/A
Screenshots
Font Awesome version
FontAwesome 6 and up, vue-fontawesome 3 and up.
Serving
Font Awesome CDN, Self-hosted
Implementation
SVG+JS
Browser and Operating System
All supported operating systems and browsers.
Web bug report checklist
Misc
As a side-note, is there a better place to report issues about the documentation or contribute to it? I couldn't find any repository holding the documentation pages.
The text was updated successfully, but these errors were encountered: