Bundling and minification can be enabled or disabled in two ways: either setting the value of the debug attribute in the compilation Element in the Web.config file or setting the
enableOptimizations property on the
In the following example, debug is set to true in web.config to disable bundling and minification.
<system.web> <compilation debug="true" /> </system.web>
Also, you can enable or disable bundling and minification by setting the
EnableOptimizations property of the
BundleTable class. This overrides the web.config settings.
In the following example, EnableOptimizations is set to true to enable bundling and minification.
- Difference between Html.Partial() and Html.RenderPartial() in ASP.NET MVC
- Difference between Html.RenderBody() and Html.RenderSection() in ASP.NET MVC
- How to set image path in StyleBundle?
- How to pre-compile razor view in ASP.NET MVC?
- How to enable client side validation in ASP.NET MVC?
- How to display an error message using ValidationSummary in ASP.NET MVC?
- How to bind a model to a partial view in ASP.NET MVC?
- View in ASP.NET MVC