FortAwesome / react-fontawesome

Font Awesome React component
https://fontawesome.com
MIT License
3.67k stars 262 forks source link

Self Host Font Awesome with TypeScript? #553

Closed kiastorm closed 4 months ago

kiastorm commented 10 months ago

Is your feature request related to a problem? Please describe. I'm a Pro subscriber trying to self-host the font awesome SVG / JS assets via a private NPM package.

I'm following the guide here: https://fontawesome.com/v6/docs/web/setup/host-yourself/svg-js

But the font awesome for web download doesn't contain TypeScript declarations, but they are included in the official font awesome npm packages. Is there somewhere I can find these?

Describe the solution you'd like I'd like TypeScript declarations to self host FA.

xiadongdev commented 4 months ago

Any update on this? We're having the same issue

robmadole commented 4 months ago

You can use npm pack to download the NPM packages and then host these yourself.

benmcginnis commented 3 months ago

@robmadole I just tried this and it doesn't include the typescript sources, just the same JS that you get when you download from the fort-awesome website.

benmcginnis commented 3 months ago

@robmadole I just tried this and it doesn't include the typescript sources, just the same JS that you get when you download from the fort-awesome website.

sorry, i see that the icon sets themselves does in fact have the typescript definitions, it's just the base fontawesome-pro lib doesn't have typescript

robmadole commented 3 months ago

The TypeScript definitions are not available in the @fortawesome/fontawesome-pro package. That's just a version of what you can download from https://fontawesome.com/download.

TypeScript defs are available from @fortawesome/fontawesome-svg-core and @fortawesome/free-[solid|regulur]-svg-icons.