-
Notifications
You must be signed in to change notification settings - Fork 49
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
Automatically subset icons #45
Comments
Nevermind, I see that this is happening in the latest version. Going to close. |
Actually, there is still the issue of including too many icons in the subset and not being warned about it. |
@mhluska yes. This is the goal. Currently you have to control the icons that are included yourself with the configuration outlined in https://github.com/FortAwesome/ember-fontawesome#subsetting-icons It isn't documented because there are still many pieces to work out, but you can also add My advice at this point would be to include nothing by default and pay attention to your console logs where missing icons will be highlighted - this will give you the slimmest build with the best forward compatibility. |
@jrjohnson does the workaround still work? I tried setting the includes to an empty array and even tried to removed the whole config, but the icons still show up. no logs showing up. |
Here are some more details about what I found is currently going on:
includes all icons. this config:
leads to runtime errors:
subsetting still seems to work unless the two cases above, |
I'm getting similar errors to @st-h - however for me, not specifying a subset renders the page with no icons, specifying a subset throws undefined errors... |
I am also seeing the same issue as @st-h . This is combined with the experimental build time transform. |
Can anyone provide a reproducible example? |
It's caused at this line:
It's reproducible in any app when enabling the experimental build time transform and setting your icon pack subsets to Something like:
|
I'm running into the same issue as @nickschot. For now, I've included a single icon I had the following in my vendor file:
And, without any configuration in my |
I'm experiencing this issue as @ehubbell and @nickschot. It's not related to // config/icons.js
module.exports = function() {
return {
'free-brands-svg-icons': []
};
}; Not a big issue as you just need to whitelist a single icon to fix this issue as @ehubbell pointed out; but it did give me good 15 min of |
Is it possible to automatically subset icons based on usage in the code? I run into the problem where I sometimes forget to include an icon in my icon subset and the server builds without complaint. So a production bug occurs where the icon is missing. This could be solved by either showing a warning or error when a missing icon is used or somehow dynamically generating the icon subset.
The text was updated successfully, but these errors were encountered: