Closed Minho-Lee closed 2 years ago
Same issue, and even though I can import and use the v6 icons just fine through tree-shaking, my eslint is giving the error, faFilterList not found in '@fortawesome/pro-regular-svg-icons'eslint[import/named]
for each v6 icon I'm using.
I'm experiencing the same issue
All, try upgrading to 6.1.0
. This includes @fortawesome/fontawesome-common-types
and @fortawesome/fontawesome-svg-core
as they are now version-aligned with the rest of the packages.
@robmadole Thanks! Upgrading the version to 6.1.1
seemed to fix my issue. 🙏
Describe the bug
pro-solid
andpro-light
icons with Fontawesome 6 doesn't seem to work with React + Typescript.Reproducible test case I tried reproducing this with
free-solid
, but it seems to work, so I don't have a reproducible stackblitz url.The above will throw the error describe in the title. If I actually follow the icon into
index.d.ts
, I can see theIconDefinition
there properly. From my initial research, it seems to be an issue with tree-shaking, as this seems to work.import { faAlbumCollection } from '@fortawesome/pro-solid-svg-icons/faAlbumCollectionCirclePlus';
(As suggested from here: https://fontawesome.com/v6/docs/apis/javascript/tree-shaking).This is what's in my
package.json
:Expected behavior I expect the icon to render without import errors.
Desktop (please complete the following information):