After I download the latest font awesome package, I have found that it is 1.4mb which is very big. I was wondering, if I put the whole folder in my Angular 2 project, would that increase my deployment by 1.4mb even if I just used a few fonts?
Asked
Active
Viewed 305 times
2
-
In the package, you have the minified and plain versions along with other potentially no mandatory files. Open the folder and pick what meet your need – mickdev Feb 26 '17 at 09:01
-
Am I correct to assume the Angular CLI does the job for me by it's tree shaking function? – ErnieKev Feb 27 '17 at 00:47
-
nope, Angular CLI like many CLI fetch the package and put it in the right directory. It's up to you to take what you need. If you have no idea, just use the CDN (your app will fetch the package on Fontawesome remote server) – mickdev Feb 27 '17 at 01:41
-
Hi @ErnieKev! You should keep an eye on FontAwesome 5. Fairly soon (1 month?) they will have a polished Angular integrated version with tree shaking. https://github.com/FortAwesome/angular-fontawesome/ For now, they do have some guides (https://fontawesome.com/how-to-use/use-with-node-js), but I've haven't yet gotten it wired up following their instructions or a related blog entry. Either way, I'd expect by April 2018 a lot of the issues for FA 5 with tree shaking to be ironed out and polished! – ryanm Feb 06 '18 at 22:34