The current 5.5.0 all.js file is is 432kb.

Almost half of this (182kb) is the brands.js set, which I would wager a decent percentage of users don't use.

Many users could get by just fine with one of the Solid/Regular/Light packs. The regular pack and the fontawesome.js file for 5.5.0 total only 50kb, saving a substantial 382kb over all.js.

Can we add the option to only include the option sets you want? Sorry if this has been posted elsewhere, I searched and don't believe it has.

Thanks!

Comments

vood002 created an issue. See original summary.

daniel.moberly’s picture

Assigned: Unassigned » daniel.moberly

I think this is a good idea. Working on a patch.

truls1502’s picture

Sounds a good idea. Will try and test once Daniel had made the patch 👍🏻

daniel.moberly’s picture

Title: Add option to only use select js files instead of all.js to save on filesize » Add option to individually load Font Awesome files
Status: Active » Needs review
StatusFileSize
new17.63 KB

Attaching patch. This is a big one. By default I have the users loading all files. Files may be added or removed on the settings page under "Partial File Configuration"

daniel.moberly’s picture

Assigned: daniel.moberly » truls1502
vood002’s picture

I installed this patch today and it seems to be working perfectly. This is an elegant implementation, thanks for the great module!

truls1502’s picture

Status: Needs review » Reviewed & tested by the community

It works great.

truls1502’s picture

Do you, @Daniel.Moberly, mind to fix for #3015234: Add option to individually load Font Awesome files for D7 too?

  • Daniel.Moberly committed 89c740e on 8.x-2.x
    Issue #3013478 by Daniel.Moberly: Add option to individually load Font...
daniel.moberly’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

truls1502’s picture

Assigned: truls1502 » Unassigned

Unassign myself.