Laravel Mix Bootstrap Glyphicons无法加载 [英] Laravel Mix Bootstrap Glyphicons not loading
本文介绍了Laravel Mix Bootstrap Glyphicons无法加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个新的laravel应用程序并添加了auth模板.
I created a new laravel application and added the auth template.
我尝试添加此按钮:
<button type="button" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-stop" aria-hidden="true"></span>
</button>
但是字形图标未加载,我在Chrome控制台中收到此错误:
But the glyphicons are not loading I get this error in my Chrome console:
GET http://localhost/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2?448c34a56d699c29117adc64c43affeb
GET http://localhost/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff?fa2772327f55d8198301fdb8bcfc8158
GET http://localhost/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf?e18bbf611f2a2e43afc071aa2f4e1512
npm监视已在运行.
npm watch is already running.
还有什么可能导致此错误?
What else could cause this error?
推荐答案
此问题是由您通过 http访问网站引起的://localhost/something/public -而不使用VirtualHost.
This problem is caused by you accessing the site through http://localhost/something/public - and not using a VirtualHost.
我自己也遇到了完全相同的错误,并意识到它是从 http://localhost/请求文件,而不是从项目文件夹.
Just had the exact same error myself, and realized it was requesting the files from http://localhost/ and not from the projectfolder.
这篇关于Laravel Mix Bootstrap Glyphicons无法加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文