Open jared-leddy opened 1 year ago
Solution: Large Font Awesome Icon Issues on Next.js
From the problem above, we had large icons and many icons were missing. We added the code below, and our icon problem went away.
import { config } from '@fortawesome/fontawesome-svg-core' import '@fortawesome/fontawesome-svg-core/styles.css' config.autoAddCss = false
Once the icon problem went away, we discovered that our custom SCSS files were not loading. For Next.js, the issue does not happen in dev on localhost. Only when using prod, or the app is deployed on Vercel, does this problem show up.
Min-Reproduction
{ "@fortawesome/free-brands-svg-icons": "^6.4.0", "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", }
https://github.com/carbondigitalus/min-repro
No response
v6.4.0
Other (as specified in the bug description)
Still trying to resolve this issue.
I have the same issue. At least the temporary solution works great!
Bug description
Solution: Large Font Awesome Icon Issues on Next.js
From the problem above, we had large icons and many icons were missing. We added the code below, and our icon problem went away.
Once the icon problem went away, we discovered that our custom SCSS files were not loading. For Next.js, the issue does not happen in dev on localhost. Only when using prod, or the app is deployed on Vercel, does this problem show up.
Min-Reproduction
NPM Versions
Reproducible test case
https://github.com/carbondigitalus/min-repro
Screenshots
No response
Font Awesome version
v6.4.0
Serving
Other (as specified in the bug description)
Implementation
Other (as specified in the bug description)
Browser and Operating System
Web bug report checklist