Workaround for angular production build stuck at 92%

Reading Time: < 1 minute


1) Add –build-optimizer false to turn off optimizer to sacrifice bundle size for space

ng build --prod --build-optimizer false

2) Add script to package.json

"scripts": {
    "build-prod": "ng build --prod --build-optimizer false",

With npm,

 npm run build-prod

or with yarn,

 yarn build-prod

Build artifacts can be found in dist/ directory