Closed jdanino closed 4 years ago
Could you please check:
.nuxt/fontawesome.js
in your buildDir? Is there any strange content?fa-*
classes? Are those classes listed with rules in the Style rules tab of the dev console? If they arent listed in the style rules tab, then the css is just not loaded.
If you are using PurgeCSS, try to white list all fa-* classesThanks for the reply. Turns out I was running purgeCSS and it removed the styles since the last npm update.
@jdanino could you provide some more info about how you fixed this? I'm getting the same issue: styles aren't making it into my production build, but my icons are still there.
I was able to hack a fix by putting this in my nuxtConfig, but it seems like this should either be mentioned in the docs or there should be an easier fix:
purgeCSS: {
whitelistPatterns: [/-fa$/, /^fa-/],
}
I ended up adding whitelistPatterns: [/fa/], to my nuxtconfig just like you did and I agree this could/should be mentioned somewhere
@jdanino could you provide some more info about how you fixed this? I'm getting the same issue: styles aren't making it into my production build, but my icons are still there.
I was able to hack a fix by putting this in my nuxtConfig, but it seems like this should either be mentioned in the docs or there should be an easier fix:
purgeCSS: { whitelistPatterns: [/-fa$/, /^fa-/], }
@jdanino Feel free to submit a PR to add a section to the readme about using PurgeCSS :)
this is happening to me for Tailwind v.3.x but am not using purgeCss at all -- thoughts?
I found another solution on nuxt v2, when you don't use PurgeCSS - you have to install 2 packages that is not mentioned: https://www.npmjs.com/package/@fortawesome/vue-fontawesome - yarn add @fortawesome/vue-fontawesome@latest https://www.npmjs.com/package/@fortawesome/fontawesome-svg-core - yarn add @fortawesome/fontawesome-svg-core That 100% worked for me.
Slight update to above... on nuxt v2, this worked for me:
yarn add @fortawesome/vue-fontawesome@2
yarn add @fortawesome/fontawesome-svg-core
I've been using your package for a while and everything was working fine. However, after updating last week the Icons turned huge (as in 640 x 562 px) when in production mode. when in development mode everything is fine. I cant figure out what is causing this.. any idea?