我强烈建议在您的应用程序上实现 lazy loading。它将为您的应用程序带来巨大的性能提升。我是用我自己的经验告诉这些事情的。
之后,您需要将您的应用升级到Angular 5 / Ionic 3.9.2。这也将为您的应用程序带来惊人的性能改进和非常小的包大小。
您可能需要的参考资料:
Ionic and Lazy Loading Pt 1
Ionic and Lazy Loading Pt 2
Angular 5 / Ionic 3.9.2 release notes
如何升级到 Angular 5 / Ionic 3.9.2
第 1 步: 如下更改您的 package.json。
"dependencies" : {
...
"@angular/common": "5.0.0",
"@angular/compiler": "5.0.0",
"@angular/compiler-cli": "5.0.0",
"@angular/core": "5.0.0",
"@angular/forms": "5.0.0",
"@angular/http": "5.0.0",
"@angular/platform-browser": "5.0.0",
"@angular/platform-browser-dynamic": "5.0.0",
"@ionic/storage": "2.1.3",
"ionic-angular": "3.9.2",
"rxjs": "5.5.2",
"zone.js": "0.8.18"
...
},
"devDependencies: {
"@ionic/app-scripts": "3.1.0"
"typescript" : "2.4.2"
}
第二步:删除node_modules文件夹。
第 3 步: 运行 > npm i