Aurelia CLI包括Bootstrap Glyphicons

前端之家收集整理的这篇文章主要介绍了Aurelia CLI包括Bootstrap Glyphicons前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试在我的Aurelia CLI项目中包含Bootstrap,并且CSS和JS工作正常.

我唯一的问题是glyphicons需要加载字体文件.

我用这个配置:

"dependencies": [
    {
        "name": "bootstrap","path": "../node_modules/bootstrap/dist","main": "js/bootstrap.min","deps": ["jquery"],"exports": "$","resources": [
          "css/bootstrap.min.css","fonts/glyphicons-halflings-regular.woff2"
        ]
    }
]

但是我收到包含这一行的错误

path: ‘C:\Users\randy\Documents\form\node_modules\bootstrap\dist\fonts\glyphicons-halflings-regular.js’

因此即使我包含.woff2文件,Aurelia也会尝试将该文件作为JS文件导入.我能做些什么来完成这项工作? CSS确实很好用.

解决方法

看起来这是Aurelia CLI当前版本中的一个错误.我在这里提交了一个问题: https://github.com/aurelia/cli/issues/248
原文链接:https://www.f2er.com/bootstrap/233961.html

猜你在找的Bootstrap相关文章