Problem/Motivation
When using shim, the all.min.js is always loaded even if we unchecked some styles.
Based on the fontawesome doc this is not needed:
https://fontawesome.com/v5/docs/web/use-with/wordpress/install-manually#...
You should use the same version for the shims as you use for the main assets (such as either all.js, or some combination of fontawesome.js and styles like duotone.js, as shown above).
Steps to reproduce
In BO:
- Choose only duotone in Partial file configuration
- Check "Use version 4 shim file?"
In front, all.min.js is loaded when it is not needed:

Proposed resolution
remove dependency from the shim libraries to the all libraries
Remaining tasks
Dependencies can be handled dynamically in the hook_library_info_alter()
I don't think that this is worth it but if someone has more time to handle it, it would be cleaner.
| Comment | File | Size | Author |
|---|---|---|---|
| fontawesome all.min_.js loaded.jpg | 10.09 KB | clement.ferrier |
Issue fork fontawesome-3276227
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
daniel.moberly commentedNice catch - thanks! Committed.