I've done some research and testing into this and it appears to be normal. The
webpack-bundle-analyzer has issues with the
ModuleConcatenationPlugin, as Alex Smagin pointed out (GitHub issue - note that angular-cli is not using Webpack 4)
To test, I hacked angular-cli's webpack config locally to remove the
ModuleConcatenationPlugin. The bundle analyzer picture looks drastically different with concatenation off:
Without the concatenation there is no huge-looking main.ts, because the system stuff being lumped into that is no longer there.
The bundle size with module concatenation off is about 50k larger than with it on, so the optimization is definitely doing something.
Note: I analyzed the Angular Advanced app.
Angular definitely is a pretty hefty library.
Angular config hacked:
Command to build (modified
cross-env-shell ng build --target=production --environment=prod --base-href / --deploy-url $npm_package_config_sitecoreDistPath/browser --output-path=$npm_package_config_buildArtifactsPath/browser --prod --stats-json