New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with FontAwesome 6 and dynamic import of single icons #18873
Comments
Hi! Thanks for being part of the Font Awesome Community and sorry for the late reply. Sorry, I do not have a solution for this @robmadole any thoughts? |
Any update about this ? |
I was just about to open an issue about this when I find it already has been opened, any info or update regarding this? |
We are following the spec for the new |
I see, I will share a bit of code & the issue With FA v5 the following works:
With FA v6 the above does not work, it throws the following error: Removing the |
This is also tracked in webpack: I don’t think it can actually be fixed here (without removing exports, but that's too late) |
Since we updated to version 6 we're not able to use dynamic imports of single icons like the following:
This used to work with fontawesome 5, and also with fontawesome 6 + old version of webpack (< 5).
We traced back the issue to the following addition in the package.json:
When using this with webpack > 5 the dynamic imports stopped working. Manually removing the exports property from fontawesome packages (e.g. @fortawesome/free-brands-svg-icons) is fixing the issue.
The text was updated successfully, but these errors were encountered: