Skip to content

How to integrate font awesome for dev and production

Nathan Walker edited this page Mar 24, 2017 · 2 revisions

No build task modifications are needed.

  1. npm i angular2-fontawesome --save
  1. Reference angular2-fontawesome in tools/config/project.config.ts
  2. Add Angular2FontawesomeModule in web.module.ts
  3. Download font-awesome and place the scss files in src/client/css/font-awesome/* and the fonts in src/client/assets/fonts/*
  4. Update the path of the fonts in src/client/css/font-awesome/_variables.scss to $fa-font-path: "../../assets/fonts" !default;
  5. In src/client/css/main.scss I added @import 'font-awesome/font-awesome';

All the fontawesome css is now bundled into main.css. Works for dev and production.