Skip to content
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

All icons end up in Universal Build #212

Open
dottodot opened this issue Dec 10, 2019 · 1 comment
Open

All icons end up in Universal Build #212

dottodot opened this issue Dec 10, 2019 · 1 comment

Comments

@dottodot
Copy link

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.

@devoto13
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants