I have a large (hundreds of components) angular (5.2.4) app. I upgraded the following, and am able to build clean, but the resulting bundle sizes are larger than with v5:
- Node.js and Angular CLI updated
- Http converted to use HttpClient
- rxjs conversion from 5 to 6 (pipe operators)
- converted .angular-cli.json to new angular.json
- removed/replaced any deprecated usage (minimal)
We build using an npm script like the following due to a known issue with the JS heap causing grief:
node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --target=production --aot=true --progress=false --env=STAGING
I revised this script to the following based on commands changing in the angular cli:
node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --prod --aot --progress=false --c=USER
Prior to upgrading, our main bundle size was ~9MB. After upgrading, it's ~21MB. Any thoughts or suggestions to diagnose this would be greatly appreciated!