I'm trying to include font awesome 5 to my angular-cli project (1.6.0) running Angular >5.0.0.
I used (as described):
yarn config set @fortawesome:registry https://npm.fontawesome.com/xxxxx-xxxx-xxx-xxx-xxxxxxx
yarn add @fortawesome/fontawesome
yarn add @fortawesome/fontawesome-pro-light
It gets the packages successfully. Now I want to include the package to my angular-cli. In my app.component.ts
I tried to do (as described at: https://www.npmjs.com/package/@fortawesome/fontawesome):
import fontawesome from '@fortawesome/fontawesome'
import { faUser } from '@fortawesome/fontawesome-pro-light'
But typescript throws and error:
ERROR in src/app/app.component.ts(2,9): error TS1192: Module '"xxx/node_modules/@fortawesome/fontawesome/index"' has no default export.
With Font Awesome 4 I just included the .css file to "styles" array. But Font Awesome 5 doesn't have a css file that has all the css. It's just a bunch of .js files.
How can I include Font Awesome 5 in my Angular CLI project properly? (I want to be able to use for example <i class="fal fal-user"></i>
in my markup)