Fontawesome is not working when project is built with grunt

前端 未结 15 1154
余生分开走
余生分开走 2020-12-02 07:50

I\'m using the font library font awesome. It works when the project is not built/uglified with grunt.

But when I\'m building the project with grunt it\'s not workin

15条回答
  •  [愿得一人]
    2020-12-02 08:13

    If you're using SASS in your project, I found a more straightforward way that doesn't involve changing the grunt file if anyone is interested:

    http://likesalmon.net/use-font-awesome-on-yeoman-angularjs-projects/

    Basically include these 2 lines at the top of your main.scss file and the fonts should work.

    $fa-font-path: "/bower_components/font-awesome/fonts/";
    @import "font-awesome/scss/font-awesome";
    

提交回复
热议问题