angular-fontawesome icon indicating copy to clipboard operation
angular-fontawesome copied to clipboard

All icons end up in Universal Build

Open dottodot opened this issue 4 years ago • 1 comments

I've just found out that when I build my universal app all the svg code for the icons ends up in my server.js which I'm sure can't be good for performance as it's 1000's of lines of unnecessary code

They are not in the client side build so how do I prevent them ending up server build.

dottodot avatar Dec 10 '19 12:12 dottodot

angular-fontawesome relies on Angular build system to perform dead code elimination and drop unused icons from the bundle. Since you don't have them in the client bundle I would first double check in your angular.json file if optionzation is set to true in you server builder and/or that you pass --prod flag when building server bundle.

image

devoto13 avatar Dec 11 '19 18:12 devoto13