I am just trying out ASP.NET MVC 4 but I can\'t figure out how to disable Javascript/CSS minification feature. Especially for development environment this will help greatly
After the call to EnableDefaultBundles()
in Global.asax, you can do this ...
if ( ... running in development environment ...)
{
var registeredBundles = BundleTable.Bundles.GetRegisteredBundles();
foreach (var bundle in registeredBundles)
{
if (bundle.Transform is System.Web.Optimization.JsMinify)
bundle.Transform = new NoTransform();
}
}
Not pretty (modifying state set by the system), but it's a lot less code than all the other suggestions, still lets you use the standard bundling behavior and it doesn't involve any changes to your views.