CoreUI SVG 图标无法显示来自 node_modules

问题描述

我正在尝试从 node_modules 的 CoreUI 包中加载 SVG 图标

图标位于:node_modules/@coreui/icons/svg/free/cil-envelope-open.svg

我能够验证它的位置

<svg class="c-icon">
    <use xlink:href="node_modules/@coreui/icons/svg/free/cil-envelope-open.svg">
    </use>
</svg>

我尝试输入完整路径 ~/Documents/Project/node_modules/@coreui/icons/svg/free/cil-envelope-open.svg - 仍然没有结果,我不知道这是路径问题还是我遗漏了一些重要的东西。

Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:4200/node_modules/@coreui/icons/sprites/free.svg

任何提示将不胜感激

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)