I am currently working on an application which is scheduled to go live soon. The problem is that I have to do a fair amount of cleanup for AOT, because when I run the following:
ng build --prod
it gives me error as my code is not fulfilling the requirements for AOT (example: not using service object directly in templates, etc.). So is there way to enable prod mode with AOT to get all the good stuff like treeshaking, minification, uglify, etc. that Angular prod mode offers and just leave AOT for the time being?
NOTE: I’m considering enabling the prod mode in main.ts file and not on my local machine, using the following method:
enableProdMode();