After I build a bundle with ng build --prod --aot
I would like to quickly serve it locally. Is there a way to quickly serve the /dist
directory locally
Following did the trick for us:
ng serve --configuration production
If running the Angular development server that way the production configuration is used and you can observe the results.
We also encountered that when building the application for production the --prod flag was not enough we needed to explicitly set the --configuration option to production for referencing the correct configuration files.:
ng build --configuration production