[cli v4] App size too big, all ionicons v4 packed into bundle
Description: In an Ionic v4 app, when building it with the cli v4, all ionicons will be integrated in the bundle regardless of their use or not which leads to a too big app size
When I run ionic cordova build android --prod --release the app-release.apk will contains a folder www/svg with all ionicons
Steps to Reproduce:
ionic start test-icons --type=angular
cd test-icons
ionic cordova build android --prod
cd platforms/android/app/build/outputs/apk/debug/
unzip app-debug.apk
cd assets/www/svg/
ls -ltr
or
ls -ltr | wc -l
which will count 697 icons
Output:
My ionic info:
Ionic:
ionic (Ionic CLI) : 4.0.3 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.0.0-beta.3 @angular-devkit/core : 0.7.3 @angular-devkit/schematics : 0.7.3 @angular/cli : 6.1.3 @ionic/ng-toolkit : 1.0.6 @ionic/schematics-angular : 1.0.5
Cordova:
cordova (Cordova CLI) : 8.0.0 Cordova Platforms : android 7.0.0
System:
Android SDK Tools : 26.1.1 ios-deploy : 1.9.2 ios-sim : 5.0.13 NodeJS : v10.4.0 (/usr/local/bin/node) npm : 6.2.0 OS : macOS High Sierra Xcode : Xcode 9.4.1 Build version 9F2000
@sylvinrodz @sandipdutta1993 I can't seem to find the www folder, what's the exact pathing on that for both iOS and Android builds?
@aaronwJordan it is the inside root folder
Every similar tool avoids copying files that are unused in the project. Why do we have to have thousands of files in total if 80% of them are not used? Please give this priority, I'm playing around with static hosting and it's insane to sync 1500+ files.