In this way the view specific resources are bundled and minified
_Layout.cshtml:
<head>
@Styles.Render("~/Content/mastercss")
@Scripts.Render("~/bundles/masterjs")
@RenderSection("header", required: false)
</head>
View :
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
@section header{
@Styles.Render("~/Content/viewspecific")
@Scripts.Render("~/bundles/viewspecific")
}
Bundles should be partitioned by pages that need them. For example,
the default ASP.NET MVC template for an internet application creates a
jQuery Validation bundle separate from jQuery. Because the default
views created have no input and do not post values, they don't include
the validation bundle
http://www.asp.net/mvc/overview/performance/bundling-and-minification