Skip to content

[cli v4] App size too big, all ionicons v4 packed into bundle #637

Description

@peterpeterparker

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:

capture d ecran 2018-08-16 a 21 11 41

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions