It takes nearly 10-15 minutes to compile the project in production mode, resulting in a dist folder size of 32MB
Here are the production options I am currently using:-
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
I am executing the following command to compile the project:-
node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod --source-map=false --named-chunks=false --statsJson=false
PS: I have already experimented with Ivy, but it does not support legacy code, resulting in build failures.
Any assistance would be greatly appreciated. Thank you.