Hi team, after upgrading to Flarum 2.x, I noticed that vendor/fortawesome/font-awesome contains about 23,000 files, which is even more than the entire Flarum core.
你好,升级到 Flarum 2.x 之后,我发现 vendor/fortawesome/font-awesome 目录包含约 23,000 个文件,比整个 Flarum 主程序的文件数还要多。
Environment / 环境信息:
Flarum version / Flarum 版本: 2.0.0-rc.8
PHP version / PHP 版本: 8.4
Install method / 安装方式: composer update from 1.8.20
File count / 文件数: vendor/fortawesome/font-awesome ≈ 23,000 files; entire vendor ≈ 30,000+ files
From what I understand, Flarum 2.x now bundles Font Awesome directly in core, and the upstream package ships every icon as an individual SVG file for each style (Solid / Regular / Brands / Sharp), plus sprites, js, css, scss, less, metadata, webfonts folders — which explains the huge file count.
据我了解,Flarum 2.x 把 Font Awesome 直接内置进核心,而上游包会把每个图标按风格(Solid / Regular / Brands / Sharp)各存一份独立 SVG,另外还有 sprites、js、css、scss、less、metadata、webfonts 等目录 —— 这可以解释文件数量为什么这么大。
So my questions are:
所以我的问题是:
Is this file count expected, or is my installation somehow bloated/corrupted?
这个文件数量是预期行为吗?还是我的安装出了问题?
Would the core team consider slimming down this dependency, e.g. by only shipping the webfonts + css build instead of the full SVG-per-icon distribution, or by allowing an option to strip unused styles?
核心团队是否考虑精简这个依赖,例如只保留 webfonts + css 产物而不发布整套逐图标 SVG,或者提供一个开关来移除用不到的风格?
This matters mainly for users on shared hosting with strict inode limits, and for backup size / deployment time.
这主要影响那些有 inode 限制 的共享主机用户,以及备份体积和部署时间。
Thanks, and happy to provide more info if needed.
谢谢,如需更多信息我可以补充。