You can enable this by adding
BundleTable.EnableOptimizations = true;
in your RegisterBundles method (BundleConfig class in the App_Start folder).
check http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification for more info
You could also change your web.config:
<system.web>
<compilation debug="false" />
</system.web>
But this would disable debug mode entirely so I would recommend the first option.
Finally, to get the best of both worlds, use the #if compiler directive like this:
#if DEBUG
BundleTable.EnableOptimizations = false;
#else
BundleTable.EnableOptimizations = true;
#endif
add BundleTable.EnableOptimizations = true;
in Application_Start()
method of Global.asax
file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With