Control Bundling and Minification of scripts and styles in ASP.NET MVC
28-12-2015 15:36:38
C# / ASP.NET MVC
0 Bookmark(s)
244 View(s)
By default, bunding is enabled in release mode (debug=false in web.config).
To disable bundling and minification, add the following line:
System.Web.Optimization.BundleTable.EnableOptimizations = false;
Putting EnableOptimizations = true this will bundle and minify even if debug=true in web.config
To disable minification add the following lines right afterBundleConfig.RegisterBundles
foreach (var bundle in BundleTable.Bundles)
{
bundle.Transforms.Clear();
}