为什么我获得“服务器响应的状态为404”。对于ReactJS的Remixicon.Woff2?
我正在使用Remixicon在我的ReactJS应用程序中存储在MySQL数据库中的菜单中显示图标。但是我总是会得到:尽管我已经导入了它,但对于emixicon.woff2的服务器的响应为404。 这是代码:
<Icon name={item.menu_icon} type={item.menu_icon_type} />
{
item.menu_icon == '' && item.menu_icon_type == '' &&
<>
<Icon name='home-3' type='line' />
</>
}
这就是我的导入方式:
import Icon from 'react-remixicon'
I'm using remixicon for displaying icons in the menu which are stored in MySQL database in my reactJs application. But I always get : the server responded with a status of 404 for emixicon.woff2 despite I already imported it.
this is the code :
<Icon name={item.menu_icon} type={item.menu_icon_type} />
{
item.menu_icon == '' && item.menu_icon_type == '' &&
<>
<Icon name='home-3' type='line' />
</>
}
This is how I imported it :
import Icon from 'react-remixicon'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能会在.NET服务器上发生,因为默认情况下它不会处理WOFF2文件类型。您可以在web.config中包含此信息:
内部的部分:
This can happen on .NET server because it doesn't handle woff2 file types by default. You can include this in web.config:
inside the section of: