question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

All icons are bundled unless explicitly specified

See original GitHub issue

When switching from ember-font-awesome to ember-fontawesome I noticed the following payload changes for my app that uses about 30 icons.

Asset FA 4 FA 5 Diff
vendor.js 545 KB 761 KB +216 KB
font 67 KB 0 KB -67 KB
app.css 31 KB 23.9 KB -7.1 KB

So overall, an increase of 141.9 KB from the switch.

I have not added anything to my ember-cli-build.js, and I’m using both the fontawesome-free-brands and fontawesome-free-solid packages on v5.1.0-3. These were installed with yarn add [pkgname] per the readme (not dev dependencies).

From this comment I was under the impression that this addon implemented tree shaking to get rid of unused icons. Is that not the case? Is there something else I need to do to get the build size back down?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bgentrycommented, Feb 28, 2018

I think it’s reasonable to expect folks to whitelist the dynamic icons they want to include. The “all” option makes it easy for people who really don’t care about payload size and just want it to work.

The truly bad part of the whitelisting experience is that users have to restart their app server each time they want to add an icon to the list and have it be available in development. But I don’t think there is any way to avoid that in dev while still warning them about non-whitelisted icons, is there?

1reaction
jrjohnsoncommented, Feb 28, 2018

I’m not sure what we should optimize for here. The Ember way is generally to provide the best experience possible with the least configuration. In this case though I think a minimal build is the best experience. Since it looks like it will be possible to handle static icon names in a transform it won’t require a lot of work on a developers part to just register their dynamic icons (especially since missing icons throw a console error). If we leave icons in by default then it becomes much more annoying later to attempt to discover which icons are missing once a developer realizes that they can save a lot of file size by doing so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

App Icons on iPhone, iPad and Apple Watch
QA1686: explains how the icon files in an application bundle are used on iPhone, iPad and Apple Watch.
Read more >
Manifest merger failed targeting Android 12 - Stack Overflow
I'm working on a large framework with a lot of dependencies and would like to test against Android 12. I know some of...
Read more >
Migrating to Cordova-Android 11 - Ionic
All app submissions will be required to target Android 12 (API level. ... to be explicitly specified for element <activity#your.bundle.id.
Read more >
Activity | Android Developers
All activities will implement onCreate(Bundle) to do their initial setup; ... Obtain an Intent that will launch an explicit target activity specified by ......
Read more >
Zebra EHS Advanced Settings
If bundle and icon attributes are used, the same specified attributes apply to all wildcard-selected apps. Wildcard search works only with User Mode...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found