Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automatically remove HTML comments in Release mode?

I am trying to find a way to automatically remove HTML comments in release mode for two main reasons

  • Minification: there is a lot of comments in some pages
  • Comments contain development notices and TODO lists (which are exposed to end user).

I am using ASP.NET MVC and looking for something in the same spirit as the bundling and minification features.

like image 467
Moslem Ben Dhaou Avatar asked Dec 14 '22 22:12

Moslem Ben Dhaou


1 Answers

Use Razor server side comments

@*
This is a server side 
multiline comment 
*@
like image 59
Jay Douglass Avatar answered Dec 17 '22 12:12

Jay Douglass