It is taking almost 10-15 minutes to build the project in the production mode and the dist folder size is 32MB
these are the production options that I am 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 running following command to build 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 already tried with Ivy. It is not supporting legacy code hence, failing the build.
Any help will be much appreciated. thanks.