I am getting an heap out of memory error while ng build --prod ,Is there any work around. its building fine when --aot=false.
Any idea ?
Here are the steps i have done to fix the issue based on above post and its worked well for me.
Step-1
Open package.json
Add this code under scripts
"build-prod": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --prod"
Step-2
Open terminal and run execute this code "npm run build-prod"
Hope this helps