Disabling comments on Angular

0

I'm starting to study Angular (current version) and I have verified that after all the codes are compiled, the development information comments that I put in the .ts files are replicated to the .js files generated by Angular. These comments are available for reading in the page sources generated and displayed in the browser. I need the comments for the sake of documentation.

Is there any way to prevent comments from .ts files from being replicated to .js ?

    
asked by anonymous 29.08.2018 / 19:55

1 answer

1

Do not worry about this, when you build the build for production (ng build --prod), the comments will be discarded, see what is said in documentation : "Minification: removes excess whitespace, comments, and optional tokens."

    
30.08.2018 / 21:56