Build command currently using.
node pre-build && node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --prod --build-optimizer --outputHashing=all
In your angular.json
try adjusting these properties
optimization
to true
aot
to true
buildOptimizer
to true
It will enable optimizations like tree shaking
and get rid of unnecessary code.