Angular-cli-无法捆绑字体 - 真棒

时间:2017-04-12 18:46:38

标签: angular angular-cli font-awesome-5

enter image description here我已经构建了我的Angular2应用程序,一切正常。现在我包括了字体很棒,当我捆绑应用程序时,它会给出图片中显示的错误。它无法加载woff和woff2文件。 我的风格如下所示 -

            "styles": [
        "styles.css",
          "../node_modules/font-awesome/css/font-awesome.css",
          "../node_modules/primeng/resources/primeng.min.css",
  "../node_modules/primeng/resources/themes/omega/theme.css",
  "../node_modules/fullcalendar/dist/fullcalendar.css",
  "../node_modules/bootstrap/dist/css/bootstrap.min.css"
      ],

enter image description here

1 个答案:

答案 0 :(得分:0)

如果在角度最近版本中更改了文件夹结构,则应该引用错误的路径来修复它

"styles": [
    "styles.css",
      "node_modules/font-awesome/css/font-awesome.css",
      "node_modules/primeng/resources/primeng.min.css",
      "node_modules/primeng/resources/themes/omega/theme.css",
      "node_modules/fullcalendar/dist/fullcalendar.css",
      "node_modules/bootstrap/dist/css/bootstrap.min.css"
  ],