Monday, March 8, 2021

Running prod Angular on Dev Machine

 Build your app using the prod flag. 

NG_BUILD_MANGLE=false node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng build --prod --aot


*NG_BUILD_MANGLE is used for performance troubleshooting. 

once done, go to dist directory and run npm i -g serve (if not already installed)

and then run serve -s. this will start the http server. 


Better you do performance troubleshooting in incognito mode where no chrome extension is loaded. I assumed you are using chome for performance troubleshooting :)

No comments:

Post a Comment