Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在按照本教程在我的项目中导入fontello。
但在第 5 步中,我没有 fontello.css 文件。
所以,在你的 App.js 中导入 fontello 导入“./fontello/css/fontello.css”
所以,在你的 App.js 中导入 fontello
导入“./fontello/css/fontello.css”
正如您在我的项目中看到的那样,我没有那个文件。那么如何将 Fontello 导入我的项目?
好吧,似乎cli实际上在css中设置了所有文件名my-icon而不是fontello
my-icon
fontello
为了让你的代码工作,你可以像导入 css
import "./fontello/css/my-icons.css"
它应该工作相同
编辑:
另一种解决方案,如果您将名称字段设置为config.json然后fontello运行fontello-cli install,这将导致 css 文件名以名称为前缀,fontello您可以像中篇文章中提到的那样导入它
config.json
fontello-cli install