Aurelia CLI include Bootstrap Glyphicons

﹥>﹥吖頭↗ 提交于 2019-12-05 04:11:18

It looks like this is a bug in the current version of the Aurelia CLI. I've submitted an issue for you here: https://github.com/aurelia/cli/issues/248

JayDi

Aurelia can't process font files. You must use manual bundle task for it.

Here is similar solution for font-awesome: https://stackoverflow.com/a/39544587/1276632

Here is solution for glyphicons (I used it for bootstrap v4 integration): https://github.com/aurelia/cli/issues/248#issuecomment-250967074

This has been solved, for more information read the Github issue.

This issue can now be solved by adding a copy instruction in the aurelia.json.

aurelia.json - valid if the project was created by aurelia-cli 0.25.0 or greater

Add the following in the build block:

"bundles": [ ... ], 
"copyFiles": {
  "node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2": "bootstrap/fonts",
  "node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff":  "bootstrap/fonts",
  "node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf":   "bootstrap/fonts"
}

If the project was created by an older CLI version, you will have to create the copy task inside the tasks folder

After that, call the copy task in the build.js/ts task


* credits to fabioluz for commenting this on github

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!