Public Conditional Razor Views with minified JS and CSS
I am using ASP.NET MVC 5 to develop my website. I'm using Grunt to minify my CSS and JS. Everything works fine, but I need to change the route source of my files if I'm making a publish (release mode) or I'm debugging (I need to read my CSS and JS clearly). Something like this: [Debug Mode] <script src="scripts/myscript.js"></script> [Relase Mode or Public Mode] <script src="dist/myscript.min.js"></script> I have read this post on StackOverflow( Razor view engine, how to enter preprocessor(#if debug) ) and I don't like the proposed solution because I think (not sure) that the loaded Razon View