angular-fontawesome
angular-fontawesome copied to clipboard
All icons end up in Universal Build
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.
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](https://user-images.githubusercontent.com/823594/70647849-2a3cb280-1c4a-11ea-9750-d3de84fd5c20.png)