Reputation: 398
Angular compile typescript and turn them into javascript with the use of ng serve
command. My question is, does it default remove all comment inside html files, typescript. Or else you have ability to do this by setting the option in file like angular.json
?
Upvotes: 0
Views: 1379
Reputation: 378
By default, comments are not deleted. If you want to delete comments from Html file you just need to build your app in production mode: ng build --prod
.
If you want to delete comments from *.ts
files you need to set removeComments
in your tsconfig.json
file (https://www.typescriptlang.org/tsconfig#removeComments) like this:
{
"compilerOptions": {
"removeComments": true,
...
},
...
}
Upvotes: 2