Closed phojie closed 2 years ago
Happening for me too.
Happens to me too :C
Purge all classes even though it is already specified in the whitelistPatterns
nuxt.config.js file
...
purgeCSS: {
whitelistPatterns: [/svg.*/, /fa.*/],
},
...
Hey, can you all double-check that you are using the @fortawesome/vue-fontawesome
package? If it's vue-font-awesome
(with a space after font) that's a different project than this one.
Same thing is happening for me. Loading fine on local dev, but not loading on a SSR build on live server. Html has the fa-icon element "untouched":
<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)
Ok I found it - the "suffix" config option for @nuxtjs/fontawesome had to be explicitly set, and it was a different default on dev site (true) to server build (false).
@Phojie ---
Are you still having issues ? Did you check to make sure you had @fortawesome/vue-fontawesome
?
Ok I found it - the "suffix" config option for @nuxtjs/fontawesome had to be explicitly set, and it was a different default on dev site (true) to server build (false).
same issue here on dev working fine, production build no icons, can you provide me detailed infos how you solved it? these are my dependencies
Here's I solve the issue
Instead of importing the css file from node_modules @fortawesome folder, I just copy the css file located in node_modules /@fortawesome/fontawesome-svg-core/style.css to my assets/css folder and import it manually in nuxt.config.js
css: [
'@/assets/css/fontawesome.css',
],
Describe the bug Fontawesome icons is not recognized in production mode
Desktop (please complete the following information):