We recently noticed an issue where ng build --prod generates bad output (code will not run) the first time. However, running a second time immediately afterward the
ng build --prod