Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【图标字体性能】优化 font-awesome 使用,现利用率过低 #3158

Open
qixing-jk opened this issue Jan 16, 2025 · 3 comments
Open
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@qixing-jk
Copy link
Contributor

为什么提出这个新的特性改动
font-awesome是弱网络以及正常情况下的主要性能瓶颈之一,根据覆盖率测算,一般情况下无法超过5%

描述一下你推荐的解决方案
使用原生react包方式实现并且使用SVG和JS方式支持懒加载等更多特性

描述一下你考虑过的其它替代解决方案

补充说明
https://docs.fontawesome.com/web/use-with/react

@qixing-jk qixing-jk added the enhancement New feature or request label Jan 16, 2025
@tangly1024
Copy link
Owner

这个问题也困扰我很久了 font-awesome 对网站的性能拖累很大,

但是暂时找不到另一种可以支持在notion里配置的图标

@tangly1024 tangly1024 added the good first issue Good for newcomers label Jan 20, 2025
@tangly1024 tangly1024 changed the title 优化 font-awesome 使用,现利用率过低 【图标字体性能】优化 font-awesome 使用,现利用率过低 Jan 20, 2025
@qixing-jk
Copy link
Contributor Author

这个问题也困扰我很久了 font-awesome 对网站的性能拖累很大,

但是暂时找不到另一种可以支持在notion里配置的图标

根据传入值动态导入react组件呢?应该也可以吧?不过我还没试

在探索新的theme的实现方式,现在的没法有效路由分割,多余的JS量太大

@RylanBot
Copy link
Contributor

通过在 Notion 配置 SVG 的路径代码呢?🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants