Ionic 4 build output why so many files?


I have just built my first Ionic 4 (angular) app.

ionic build --prod

Looking inside my “www” folder there are 885 files… yes I typed that correctly… 885 files!!

having read a couple of threads I understand the need to chunk the JS is a feature designed to increase the load time however why does it generate a separate SVG file for every single IOS, MD and Logo ionicon? Surely the most sensible approach would be to only generate files for the icons that have been used. I can only assume that if this is the approach then when it compiled the 185 JavaScript files it did so for a good number of components that i’m not using either.

Is there a way of creating a build that only the complies the components / icons that i am using?



I don’t think there is a way. For the components I think I once read that it’s a feature respectively the design

For the icons, I had the same wish as I don’t want to ship unecessary icon in my app in the apple/android store. I have opened a feature request for that on the GitHub (in the cli I think)