Reputation: 59
I'm working on Angular 8 and I wish to know if is there a command in order build the application removing the all the comments?
I'm using:
ng build prod
but it doesn't remove the comments.
Upvotes: 3
Views: 2520
Reputation: 285
Check if angular.json has correct properties under production Refer to below sample code
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
},
Upvotes: 5